Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
afa86fc4
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
afa86fc4
编写于
10月 22, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
flagday: don't pass regs to copy_thread()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
135c37b8
变更
34
隐藏空白更改
内联
并排
Showing
34 changed file
with
45 addition
and
60 deletion
+45
-60
arch/alpha/kernel/process.c
arch/alpha/kernel/process.c
+1
-1
arch/arm/kernel/process.c
arch/arm/kernel/process.c
+1
-1
arch/arm64/kernel/process.c
arch/arm64/kernel/process.c
+1
-2
arch/avr32/kernel/process.c
arch/avr32/kernel/process.c
+1
-1
arch/blackfin/kernel/process.c
arch/blackfin/kernel/process.c
+3
-3
arch/c6x/kernel/process.c
arch/c6x/kernel/process.c
+1
-1
arch/cris/arch-v10/kernel/process.c
arch/cris/arch-v10/kernel/process.c
+1
-2
arch/cris/arch-v32/kernel/process.c
arch/cris/arch-v32/kernel/process.c
+1
-2
arch/frv/kernel/process.c
arch/frv/kernel/process.c
+1
-1
arch/h8300/kernel/process.c
arch/h8300/kernel/process.c
+1
-1
arch/hexagon/kernel/process.c
arch/hexagon/kernel/process.c
+1
-2
arch/ia64/kernel/process.c
arch/ia64/kernel/process.c
+2
-1
arch/m32r/kernel/process.c
arch/m32r/kernel/process.c
+1
-1
arch/m68k/kernel/process.c
arch/m68k/kernel/process.c
+1
-2
arch/microblaze/kernel/process.c
arch/microblaze/kernel/process.c
+1
-2
arch/mips/kernel/process.c
arch/mips/kernel/process.c
+2
-2
arch/mn10300/kernel/process.c
arch/mn10300/kernel/process.c
+1
-1
arch/openrisc/kernel/process.c
arch/openrisc/kernel/process.c
+1
-1
arch/parisc/kernel/process.c
arch/parisc/kernel/process.c
+2
-3
arch/powerpc/kernel/process.c
arch/powerpc/kernel/process.c
+2
-2
arch/s390/kernel/process.c
arch/s390/kernel/process.c
+1
-2
arch/score/kernel/process.c
arch/score/kernel/process.c
+2
-2
arch/sh/kernel/process_32.c
arch/sh/kernel/process_32.c
+1
-2
arch/sh/kernel/process_64.c
arch/sh/kernel/process_64.c
+2
-3
arch/sparc/kernel/process_32.c
arch/sparc/kernel/process_32.c
+2
-3
arch/sparc/kernel/process_64.c
arch/sparc/kernel/process_64.c
+2
-2
arch/tile/kernel/process.c
arch/tile/kernel/process.c
+2
-3
arch/um/kernel/process.c
arch/um/kernel/process.c
+1
-2
arch/unicore32/kernel/process.c
arch/unicore32/kernel/process.c
+1
-1
arch/x86/kernel/process_32.c
arch/x86/kernel/process_32.c
+1
-2
arch/x86/kernel/process_64.c
arch/x86/kernel/process_64.c
+1
-2
arch/xtensa/kernel/process.c
arch/xtensa/kernel/process.c
+1
-2
include/linux/sched.h
include/linux/sched.h
+1
-1
kernel/fork.c
kernel/fork.c
+1
-1
未找到文件。
arch/alpha/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -241,7 +241,7 @@ release_thread(struct task_struct *dead_task)
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
wontuse
)
struct
task_struct
*
p
)
{
extern
void
ret_from_fork
(
void
);
extern
void
ret_from_kernel_thread
(
void
);
...
...
arch/arm/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -376,7 +376,7 @@ asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
stack_start
,
unsigned
long
stk_sz
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
stk_sz
,
struct
task_struct
*
p
)
{
struct
thread_info
*
thread
=
task_thread_info
(
p
);
struct
pt_regs
*
childregs
=
task_pt_regs
(
p
);
...
...
arch/arm64/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -234,8 +234,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
asmlinkage
void
ret_from_fork
(
void
)
asm
(
"ret_from_fork"
);
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
stack_start
,
unsigned
long
stk_sz
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
stk_sz
,
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
=
task_pt_regs
(
p
);
unsigned
long
tls
=
p
->
thread
.
tp_value
;
...
...
arch/avr32/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -299,7 +299,7 @@ asmlinkage void syscall_return(void);
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
=
task_pt_regs
(
p
);
...
...
arch/blackfin/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -141,14 +141,14 @@ asmlinkage int bfin_clone(unsigned long clone_flags, unsigned long newsp)
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
topstk
,
struct
task_struct
*
p
,
struct
pt_regs
*
regs
)
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
;
unsigned
long
*
v
;
childregs
=
(
struct
pt_regs
*
)
(
task_stack_page
(
p
)
+
THREAD_SIZE
)
-
1
;
v
=
((
unsigned
long
*
)
childregs
)
-
2
;
if
(
unlikely
(
!
regs
))
{
if
(
unlikely
(
p
->
flags
&
PF_KTHREAD
))
{
memset
(
childregs
,
0
,
sizeof
(
struct
pt_regs
));
v
[
0
]
=
usp
;
v
[
1
]
=
topstk
;
...
...
@@ -157,7 +157,7 @@ copy_thread(unsigned long clone_flags,
__asm__
__volatile__
(
"%0 = syscfg;"
:
"=da"
(
childregs
->
syscfg
)
:
);
p
->
thread
.
usp
=
0
;
}
else
{
*
childregs
=
*
regs
;
*
childregs
=
*
current_pt_regs
()
;
childregs
->
r0
=
0
;
p
->
thread
.
usp
=
usp
?
:
rdusp
();
v
[
0
]
=
v
[
1
]
=
0
;
...
...
arch/c6x/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -139,7 +139,7 @@ void start_thread(struct pt_regs *regs, unsigned int pc, unsigned long usp)
*/
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
ustk_size
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
;
...
...
arch/cris/arch-v10/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -94,8 +94,7 @@ asmlinkage void ret_from_fork(void);
asmlinkage
void
ret_from_kernel_thread
(
void
);
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
=
task_pt_regs
(
p
);
struct
switch_stack
*
swstack
=
((
struct
switch_stack
*
)
childregs
)
-
1
;
...
...
arch/cris/arch-v32/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -109,8 +109,7 @@ extern asmlinkage void ret_from_kernel_thread(void);
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
=
task_pt_regs
(
p
);
struct
switch_stack
*
swstack
=
((
struct
switch_stack
*
)
childregs
)
-
1
;
...
...
arch/frv/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -144,7 +144,7 @@ inline unsigned long user_stack(const struct pt_regs *regs)
*/
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
;
...
...
arch/h8300/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -129,7 +129,7 @@ void flush_thread(void)
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
topstk
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
;
...
...
arch/hexagon/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -87,8 +87,7 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
* Copy architecture-specific thread state
*/
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
thread_info
*
ti
=
task_thread_info
(
p
);
struct
hexagon_switch_stack
*
ss
;
...
...
arch/ia64/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -393,12 +393,13 @@ ia64_load_extra (struct task_struct *task)
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
user_stack_base
,
unsigned
long
user_stack_size
,
struct
task_struct
*
p
,
struct
pt_regs
*
regs
)
struct
task_struct
*
p
)
{
extern
char
ia64_ret_from_clone
;
struct
switch_stack
*
child_stack
,
*
stack
;
unsigned
long
rbs
,
child_rbs
,
rbs_size
;
struct
pt_regs
*
child_ptregs
;
struct
pt_regs
*
regs
=
current_pt_regs
();
int
retval
=
0
;
child_ptregs
=
(
struct
pt_regs
*
)
((
unsigned
long
)
p
+
IA64_STK_OFFSET
)
-
1
;
...
...
arch/m32r/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -192,7 +192,7 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
}
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
spu
,
unsigned
long
arg
,
struct
task_struct
*
tsk
,
struct
pt_regs
*
unused
)
unsigned
long
arg
,
struct
task_struct
*
tsk
)
{
struct
pt_regs
*
childregs
=
task_pt_regs
(
tsk
);
extern
void
ret_from_fork
(
void
);
...
...
arch/m68k/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -154,8 +154,7 @@ asmlinkage int m68k_clone(struct pt_regs *regs)
}
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
fork_frame
{
struct
switch_stack
sw
;
...
...
arch/microblaze/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -120,8 +120,7 @@ void flush_thread(void)
}
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
=
task_pt_regs
(
p
);
struct
thread_info
*
ti
=
task_thread_info
(
p
);
...
...
arch/mips/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -114,10 +114,10 @@ void flush_thread(void)
}
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
regs
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
thread_info
*
ti
=
task_thread_info
(
p
);
struct
pt_regs
*
childregs
;
struct
pt_regs
*
childregs
,
*
regs
=
current_pt_regs
()
;
unsigned
long
childksp
;
p
->
set_child_tid
=
p
->
clear_child_tid
=
NULL
;
...
...
arch/mn10300/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -206,7 +206,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
*/
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
c_usp
,
unsigned
long
ustk_size
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
struct
task_struct
*
p
)
{
struct
thread_info
*
ti
=
task_thread_info
(
p
);
struct
pt_regs
*
c_regs
;
...
...
arch/openrisc/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -142,7 +142,7 @@ extern asmlinkage void ret_from_fork(void);
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
regs
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
pt_regs
*
userregs
;
struct
pt_regs
*
kregs
;
...
...
arch/parisc/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -204,10 +204,9 @@ int dump_task_fpu (struct task_struct *tsk, elf_fpregset_t *r)
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
pt_regs
*
cregs
=
&
(
p
->
thread
.
regs
);
struct
pt_regs
*
cregs
=
&
(
p
->
thread
.
regs
);
void
*
stack
=
task_stack_page
(
p
);
/* We have to use void * instead of a function pointer, because
...
...
arch/powerpc/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -733,8 +733,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
extern
unsigned
long
dscr_default
;
/* defined in arch/powerpc/kernel/sysfs.c */
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
regs
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
,
*
kregs
;
extern
void
ret_from_fork
(
void
);
...
...
@@ -759,6 +758,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
ti
->
flags
|=
_TIF_RESTOREALL
;
f
=
ret_from_kernel_thread
;
}
else
{
struct
pt_regs
*
regs
=
current_pt_regs
();
CHECK_FULL_REGS
(
regs
);
*
childregs
=
*
regs
;
if
(
usp
)
...
...
arch/s390/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -117,8 +117,7 @@ void release_thread(struct task_struct *dead_task)
}
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
new_stackp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
thread_info
*
ti
;
struct
fake_frame
...
...
arch/score/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -87,11 +87,11 @@ void flush_thread(void) {}
* set up the kernel stack and exception frames for a new process
*/
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
regs
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
thread_info
*
ti
=
task_thread_info
(
p
);
struct
pt_regs
*
childregs
=
task_pt_regs
(
p
);
struct
pt_regs
*
regs
=
current_pt_regs
();
p
->
thread
.
reg0
=
(
unsigned
long
)
childregs
;
if
(
unlikely
(
p
->
flags
&
PF_KTHREAD
))
{
...
...
arch/sh/kernel/process_32.c
浏览文件 @
afa86fc4
...
...
@@ -128,8 +128,7 @@ asmlinkage void ret_from_fork(void);
asmlinkage
void
ret_from_kernel_thread
(
void
);
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
thread_info
*
ti
=
task_thread_info
(
p
);
struct
pt_regs
*
childregs
;
...
...
arch/sh/kernel/process_64.c
浏览文件 @
afa86fc4
...
...
@@ -371,10 +371,9 @@ asmlinkage void ret_from_fork(void);
asmlinkage
void
ret_from_kernel_thread
(
void
);
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
regs
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
;
struct
pt_regs
*
childregs
,
*
regs
=
current_pt_regs
()
;
#ifdef CONFIG_SH_FPU
/* can't happen for a kernel thread */
...
...
arch/sparc/kernel/process_32.c
浏览文件 @
afa86fc4
...
...
@@ -319,11 +319,10 @@ extern void ret_from_fork(void);
extern
void
ret_from_kernel_thread
(
void
);
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
sp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
regs
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
thread_info
*
ti
=
task_thread_info
(
p
);
struct
pt_regs
*
childregs
;
struct
pt_regs
*
childregs
,
*
regs
=
current_pt_regs
()
;
char
*
new_stack
;
#ifndef CONFIG_SMP
...
...
arch/sparc/kernel/process_64.c
浏览文件 @
afa86fc4
...
...
@@ -622,10 +622,10 @@ asmlinkage long sparc_do_fork(unsigned long clone_flags,
* Child --> %o0 == parents pid, %o1 == 1
*/
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
sp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
regs
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
thread_info
*
t
=
task_thread_info
(
p
);
struct
pt_regs
*
regs
=
current_pt_regs
();
struct
sparc_stackf
*
parent_sf
;
unsigned
long
child_stack_sz
;
char
*
child_trap_frame
;
...
...
arch/tile/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -157,10 +157,9 @@ void arch_release_thread_info(struct thread_info *info)
static
void
save_arch_state
(
struct
thread_struct
*
t
);
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
sp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
=
task_pt_regs
(
p
);
struct
pt_regs
*
childregs
=
task_pt_regs
(
p
)
,
*
regs
=
current_pt_regs
()
;
unsigned
long
ksp
;
unsigned
long
*
callee_regs
;
...
...
arch/um/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -161,8 +161,7 @@ void fork_handler(void)
}
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
sp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
regs
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
void
(
*
handler
)(
void
);
int
kthread
=
current
->
flags
&
PF_KTHREAD
;
...
...
arch/unicore32/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -262,7 +262,7 @@ asmlinkage void ret_from_kernel_thread(void) __asm__("ret_from_kernel_thread");
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
stack_start
,
unsigned
long
stk_sz
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
stk_sz
,
struct
task_struct
*
p
)
{
struct
thread_info
*
thread
=
task_thread_info
(
p
);
struct
pt_regs
*
childregs
=
task_pt_regs
(
p
);
...
...
arch/x86/kernel/process_32.c
浏览文件 @
afa86fc4
...
...
@@ -128,8 +128,7 @@ void release_thread(struct task_struct *dead_task)
}
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
sp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
=
task_pt_regs
(
p
);
struct
task_struct
*
tsk
;
...
...
arch/x86/kernel/process_64.c
浏览文件 @
afa86fc4
...
...
@@ -146,8 +146,7 @@ static inline u32 read_32bit_tls(struct task_struct *t, int tls)
}
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
sp
,
unsigned
long
arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
regs
)
unsigned
long
arg
,
struct
task_struct
*
p
)
{
int
err
;
struct
pt_regs
*
childregs
;
...
...
arch/xtensa/kernel/process.c
浏览文件 @
afa86fc4
...
...
@@ -199,8 +199,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
*/
int
copy_thread
(
unsigned
long
clone_flags
,
unsigned
long
usp_thread_fn
,
unsigned
long
thread_fn_arg
,
struct
task_struct
*
p
,
struct
pt_regs
*
unused
)
unsigned
long
thread_fn_arg
,
struct
task_struct
*
p
)
{
struct
pt_regs
*
childregs
=
task_pt_regs
(
p
);
...
...
include/linux/sched.h
浏览文件 @
afa86fc4
...
...
@@ -2271,7 +2271,7 @@ extern void mm_release(struct task_struct *, struct mm_struct *);
extern
struct
mm_struct
*
dup_mm
(
struct
task_struct
*
tsk
);
extern
int
copy_thread
(
unsigned
long
,
unsigned
long
,
unsigned
long
,
struct
task_struct
*
,
struct
pt_regs
*
);
struct
task_struct
*
);
extern
void
flush_thread
(
void
);
extern
void
exit_thread
(
void
);
...
...
kernel/fork.c
浏览文件 @
afa86fc4
...
...
@@ -1320,7 +1320,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
retval
=
copy_io
(
clone_flags
,
p
);
if
(
retval
)
goto
bad_fork_cleanup_namespaces
;
retval
=
copy_thread
(
clone_flags
,
stack_start
,
stack_size
,
p
,
regs
);
retval
=
copy_thread
(
clone_flags
,
stack_start
,
stack_size
,
p
);
if
(
retval
)
goto
bad_fork_cleanup_io
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录