Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
61b7fbc3
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
6
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
61b7fbc3
编写于
9月 22, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mn10300: convert to generic kernel_thread()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
6e754210
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
36 deletion
+19
-36
arch/mn10300/Kconfig
arch/mn10300/Kconfig
+1
-0
arch/mn10300/include/asm/processor.h
arch/mn10300/include/asm/processor.h
+0
-5
arch/mn10300/kernel/process.c
arch/mn10300/kernel/process.c
+18
-31
未找到文件。
arch/mn10300/Kconfig
浏览文件 @
61b7fbc3
...
...
@@ -8,6 +8,7 @@ config MN10300
select HAVE_ARCH_KGDB
select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
select GENERIC_CLOCKEVENTS
select GENERIC_KERNEL_THREAD
config AM33_2
def_bool n
...
...
arch/mn10300/include/asm/processor.h
浏览文件 @
61b7fbc3
...
...
@@ -132,11 +132,6 @@ static inline void start_thread(struct pt_regs *regs,
/* Free all resources held by a thread. */
extern
void
release_thread
(
struct
task_struct
*
);
/*
* create a kernel thread without removing it from tasklists
*/
extern
int
kernel_thread
(
int
(
*
fn
)(
void
*
),
void
*
arg
,
unsigned
long
flags
);
/*
* Return saved PC of a blocked thread.
*/
...
...
arch/mn10300/kernel/process.c
浏览文件 @
61b7fbc3
...
...
@@ -161,24 +161,6 @@ void show_regs(struct pt_regs *regs)
{
}
/*
* create a kernel thread
*/
int
kernel_thread
(
int
(
*
fn
)(
void
*
),
void
*
arg
,
unsigned
long
flags
)
{
struct
pt_regs
regs
=
{
.
a0
=
(
unsigned
long
)
fn
;
.
d0
=
(
unsigned
long
)
arg
;
};
local_save_flags
(
regs
.
epsw
);
regs
.
epsw
|=
EPSW_IE
|
EPSW_IM_7
;
/* Ok, create the new process.. */
return
do_fork
(
flags
|
CLONE_VM
|
CLONE_UNTRACED
,
0
,
&
regs
,
0
,
NULL
,
NULL
);
}
/*
* free current thread data structures etc..
*/
...
...
@@ -232,29 +214,34 @@ int copy_thread(unsigned long clone_flags,
/* allocate the userspace exception frame and set it up */
c_ksp
-=
sizeof
(
struct
pt_regs
);
c_regs
=
(
struct
pt_regs
*
)
c_ksp
;
c_ksp
-=
12
;
/* allocate function call ABI slack */
/* set up things up so the scheduler can start the new task */
p
->
thread
.
uregs
=
c_regs
;
ti
->
frame
=
c_regs
;
p
->
thread
.
a3
=
(
unsigned
long
)
c_regs
;
p
->
thread
.
sp
=
c_ksp
;
p
->
thread
.
wchan
=
p
->
thread
.
pc
;
p
->
thread
.
usp
=
c_usp
;
if
(
unlikely
(
!
kregs
))
{
memset
(
c_regs
,
0
,
sizeof
(
struct
pt_regs
));
c_regs
->
a0
=
c_usp
;
/* function */
c_regs
->
d0
=
ustk_size
;
/* argument */
local_save_flags
(
c_regs
->
epsw
);
c_regs
->
epsw
|=
EPSW_IE
|
EPSW_IM_7
;
p
->
thread
.
pc
=
(
unsigned
long
)
ret_from_kernel_thread
;
return
0
;
}
*
c_regs
=
*
kregs
;
c_regs
->
sp
=
c_usp
;
c_regs
->
epsw
&=
~
EPSW_FE
;
/* my FPU */
c_ksp
-=
12
;
/* allocate function call ABI slack */
/* the new TLS pointer is passed in as arg #5 to sys_clone() */
if
(
clone_flags
&
CLONE_SETTLS
)
c_regs
->
e2
=
current_frame
()
->
d3
;
if
(
unlikely
(
!
user_mode
(
kregs
)))
p
->
thread
.
pc
=
(
unsigned
long
)
ret_from_kernel_thread
;
else
p
->
thread
.
pc
=
(
unsigned
long
)
ret_from_fork
;
/* set up things up so the scheduler can start the new task */
ti
->
frame
=
c_regs
;
p
->
thread
.
a3
=
(
unsigned
long
)
c_regs
;
p
->
thread
.
sp
=
c_ksp
;
p
->
thread
.
wchan
=
p
->
thread
.
pc
;
p
->
thread
.
usp
=
c_usp
;
p
->
thread
.
pc
=
(
unsigned
long
)
ret_from_fork
;
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录