Messages in this thread Patch in this message | | | From | Alex Dowad <> | Subject | [PATCH 09/32] cris/arch-v10: copy_thread(): rename 'arg' argument to 'kthread_arg' | Date | Fri, 13 Mar 2015 20:04:24 +0200 |
| |
The 'arg' argument to copy_thread() is only ever used when forking a new kernel thread. Hence, rename it to 'kthread_arg' for clarity (and consistency with do_fork() and other arch-specific implementations of copy_thread()).
Signed-off-by: Alex Dowad <alexinbeijing@gmail.com> --- arch/cris/arch-v10/kernel/process.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c index 02b7834..c8c73d3 100644 --- a/arch/cris/arch-v10/kernel/process.c +++ b/arch/cris/arch-v10/kernel/process.c @@ -94,8 +94,11 @@ unsigned long thread_saved_pc(struct task_struct *t) asmlinkage void ret_from_fork(void); asmlinkage void ret_from_kernel_thread(void); +/* + * Copy architecture-specific thread state + */ int copy_thread(unsigned long clone_flags, unsigned long usp, - unsigned long arg, struct task_struct *p) + unsigned long kthread_arg, struct task_struct *p) { struct pt_regs *childregs = task_pt_regs(p); struct switch_stack *swstack = ((struct switch_stack *)childregs) - 1; @@ -105,10 +108,11 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, */ if (unlikely(p->flags & PF_KTHREAD)) { + /* kernel thread */ memset(swstack, 0, sizeof(struct switch_stack) + sizeof(struct pt_regs)); swstack->r1 = usp; - swstack->r2 = arg; + swstack->r2 = kthread_arg; childregs->dccr = 1 << I_DCCR_BITNR; swstack->return_ip = (unsigned long) ret_from_kernel_thread; p->thread.ksp = (unsigned long) swstack; -- 2.0.0.GIT
| |