|
@@ -114,8 +114,8 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
|
|
|
/*
|
|
|
* Copy architecture-specific thread state
|
|
|
*/
|
|
|
-int copy_thread(unsigned long clone_flags, unsigned long usp,
|
|
|
- unsigned long kthread_arg, struct task_struct *p)
|
|
|
+int copy_thread_tls(unsigned long clone_flags, unsigned long usp,
|
|
|
+ unsigned long kthread_arg, struct task_struct *p, unsigned long tls)
|
|
|
{
|
|
|
struct thread_info *ti = task_thread_info(p);
|
|
|
struct pt_regs *childregs, *regs = current_pt_regs();
|
|
@@ -176,7 +176,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
|
|
|
atomic_set(&p->thread.bd_emu_frame, BD_EMUFRAME_NONE);
|
|
|
|
|
|
if (clone_flags & CLONE_SETTLS)
|
|
|
- ti->tp_value = regs->regs[7];
|
|
|
+ ti->tp_value = tls;
|
|
|
|
|
|
return 0;
|
|
|
}
|