summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/v850
diff options
context:
space:
mode:
authorMiles Bader <miles@lsi.nec.co.jp>2003-02-10 07:40:05 +0000
committerMiles Bader <miles@lsi.nec.co.jp>2003-02-10 07:40:05 +0000
commitf8f238ddf11e2b522d65fb1c47e7de23100b5032 (patch)
tree6d9943a438dcfc3412dd09f33ac7d9593fd9a552 /libc/sysdeps/linux/v850
parent68ffc5e0ff479c2fbb54a3ab81d6bb1742c995fb (diff)
Pass CHILD_STACK argument to system call (it possibly worked before `by
accident', as the function argument is in the same register).
Diffstat (limited to 'libc/sysdeps/linux/v850')
-rw-r--r--libc/sysdeps/linux/v850/clone.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/v850/clone.c b/libc/sysdeps/linux/v850/clone.c
index d024f512d..515981f4e 100644
--- a/libc/sysdeps/linux/v850/clone.c
+++ b/libc/sysdeps/linux/v850/clone.c
@@ -1,8 +1,8 @@
/*
* libc/sysdeps/linux/v850/clone.c -- `clone' syscall for linux/v850
*
- * Copyright (C) 2002 NEC Electronics Corporation
- * Copyright (C) 2002 Miles Bader <miles@gnu.org>
+ * Copyright (C) 2002,03 NEC Electronics Corporation
+ * Copyright (C) 2002,03 Miles Bader <miles@gnu.org>
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License. See the file COPYING.LIB in the main
@@ -23,13 +23,15 @@ clone (int (*fn)(void *arg), void *child_stack, int flags, void *arg)
{
register unsigned long syscall asm (SYSCALL_NUM);
register unsigned long arg0 asm (SYSCALL_ARG0);
+ register unsigned long arg1 asm (SYSCALL_ARG1);
/* Clone this thread. */
arg0 = flags;
+ arg1 = (unsigned long)child_stack;
syscall = __NR_clone;
asm volatile ("trap " SYSCALL_SHORT_TRAP
: "=r" (rval), "=r" (syscall)
- : "1" (syscall), "r" (arg0)
+ : "1" (syscall), "r" (arg0), "r" (arg1)
: SYSCALL_SHORT_CLOBBERS);
if (rval == 0)