Commit 6bda0edc authored by Richard Henderson's avatar Richard Henderson Committed by Richard Henderson

Update clone syscall for TID and TLS arguments.

parent 0a635c7a
...@@ -452,7 +452,8 @@ sys_fork: ...@@ -452,7 +452,8 @@ sys_fork:
bsr $1,do_switch_stack bsr $1,do_switch_stack
bis $31,SIGCHLD,$16 bis $31,SIGCHLD,$16
mov $31,$17 mov $31,$17
mov $30,$18 mov $31,$18
mov $30,$19
jsr $26,alpha_clone jsr $26,alpha_clone
bsr $1,undo_switch_stack bsr $1,undo_switch_stack
ret $31,($26),1 ret $31,($26),1
...@@ -463,8 +464,9 @@ sys_fork: ...@@ -463,8 +464,9 @@ sys_fork:
.ent sys_clone .ent sys_clone
sys_clone: sys_clone:
bsr $1,do_switch_stack bsr $1,do_switch_stack
/* arg1 and arg2 come from the user */ /* $16, $17, $18, $19 come from the user; $19 is used later
mov $30,$18 via pt_regs->r19. */
mov $30,$19
jsr $26,alpha_clone jsr $26,alpha_clone
bsr $1,undo_switch_stack bsr $1,undo_switch_stack
ret $31,($26),1 ret $31,($26),1
......
...@@ -245,11 +245,10 @@ release_thread(struct task_struct *dead_task) ...@@ -245,11 +245,10 @@ release_thread(struct task_struct *dead_task)
*/ */
int int
alpha_clone(unsigned long clone_flags, unsigned long usp, alpha_clone(unsigned long clone_flags, unsigned long usp,
struct switch_stack * swstack) int *user_tid, struct switch_stack * swstack)
{ {
struct task_struct *p; struct task_struct *p;
struct pt_regs *u_regs = (struct pt_regs *) (swstack+1); struct pt_regs *u_regs = (struct pt_regs *) (swstack+1);
int *user_tid = (int *)u_regs->r19;
if (!usp) if (!usp)
usp = rdusp(); usp = rdusp();
...@@ -314,6 +313,10 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, ...@@ -314,6 +313,10 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
childti->pcb.ksp = (unsigned long) childstack; childti->pcb.ksp = (unsigned long) childstack;
childti->pcb.flags = 1; /* set FEN, clear everything else */ childti->pcb.flags = 1; /* set FEN, clear everything else */
/* Set a new TLS for the child thread? Peek back into the
syscall arguments that we saved on syscall entry. */
childti->pcb.unique = (clone_flags & CLONE_SETTLS ? regs->r19 : 0);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment