]> git.neil.brown.name Git - history.git/commitdiff
[ALPHA] Update clone syscall for child_tid argument.
authorRichard Henderson <rth@dorothy.sfbay.redhat.com>
Thu, 21 Nov 2002 10:56:50 +0000 (02:56 -0800)
committerRichard Henderson <rth@dorothy.sfbay.redhat.com>
Thu, 21 Nov 2002 10:56:50 +0000 (02:56 -0800)
arch/alpha/kernel/entry.S
arch/alpha/kernel/process.c

index 1fa8e7e945ad9b8f53ca3997437cb0faa62a34b4..c21786dfff32a0b1c3cca6acbba5166fe661c6fd 100644 (file)
@@ -688,12 +688,13 @@ __kernel_execve:
        .ent    sys_fork
 sys_fork:
        .prologue 0
-       mov     $sp, $19
+       mov     $sp, $21
        bsr     $1, do_switch_stack
-       /* A fork is the same as clone(SIGCHLD, 0);  */
        bis     $31, SIGCHLD, $16
        mov     $31, $17
        mov     $31, $18
+       mov     $31, $19
+       mov     $31, $20
        jsr     $26, alpha_clone
        bsr     $1, undo_switch_stack
        ret
@@ -704,10 +705,9 @@ sys_fork:
        .ent    sys_clone
 sys_clone:
        .prologue 0
-       mov     $sp, $19
+       mov     $sp, $21
        bsr     $1, do_switch_stack
-       /* $16, $17, $18, $19 come from the user; $19 is used later
-          via pt_regs->r19.  */
+       /* $16, $17, $18, $19, $20 come from the user.  */
        jsr     $26, alpha_clone
        bsr     $1, undo_switch_stack
        ret
@@ -718,8 +718,8 @@ sys_clone:
        .ent    sys_vfork
 sys_vfork:
        .prologue 0
-       bsr     $1, do_switch_stack
        mov     $sp, $16
+       bsr     $1, do_switch_stack
        jsr     $26, alpha_vfork
        bsr     $1, undo_switch_stack
        ret
index 2e727ba90f74b194a546c6ad85cbfc292ebe6ed5..196a016657ed5aa5c0d53ffe71fb459716f8accf 100644 (file)
@@ -235,24 +235,25 @@ release_thread(struct task_struct *dead_task)
  * with parameters (SIGCHLD, 0).
  */
 int
-alpha_clone(unsigned long clone_flags, unsigned long usp, int *user_tid,
-           struct pt_regs *regs)
+alpha_clone(unsigned long clone_flags, unsigned long usp, int *parent_tid,
+           int *child_tid, unsigned long tls_value, struct pt_regs *regs)
 {
        struct task_struct *p;
 
        if (!usp)
                usp = rdusp();
 
-       p = do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0, user_tid);
+       p = do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0,
+                   parent_tid, child_tid);
        return IS_ERR(p) ? PTR_ERR(p) : p->pid;
 }
 
 int
-alpha_vfork(struct switch_stack * swstack)
+alpha_vfork(struct pt_regs *regs)
 {
        struct task_struct *p;
        p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(),
-                   (struct pt_regs *) (swstack+1), 0, NULL);
+                   regs, 0, NULL, NULL);
        return IS_ERR(p) ? PTR_ERR(p) : p->pid;
 }
 
@@ -306,7 +307,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
           required for proper operation in the case of a threaded
           application calling fork.  */
        if (clone_flags & CLONE_SETTLS)
-               childti->pcb.unique = regs->r19;
+               childti->pcb.unique = regs->r20;
 
        return 0;
 }