[uClibc-cvs] uClibc/libc/sysdeps/linux/v850 clone.c,1.2,1.3
Miles Bader
miles at uclibc.org
Mon Feb 10 07:40:09 UTC 2003
Update of /var/cvs/uClibc/libc/sysdeps/linux/v850
In directory winder:/tmp/cvs-serv4368
Modified Files:
clone.c
Log Message:
Pass CHILD_STACK argument to system call (it possibly worked before `by
accident', as the function argument is in the same register).
Index: clone.c
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/v850/clone.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- clone.c 31 Jan 2003 09:20:25 -0000 1.2
+++ clone.c 10 Feb 2003 07:40:05 -0000 1.3
@@ -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 at gnu.org>
+ * Copyright (C) 2002,03 NEC Electronics Corporation
+ * Copyright (C) 2002,03 Miles Bader <miles at 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 @@
{
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)
More information about the uClibc-cvs
mailing list