From b04c2ba52317dab5b2e4172d2f8678b1025780d8 Mon Sep 17 00:00:00 2001 From: Austin Foxley Date: Sat, 17 Oct 2009 13:19:56 -0700 Subject: i386 specific bit for nptl * RESET_PID support for clone.S * SAVE_PID, RESTORE_PID in vfork.S * fixup syscall assembly constraints to be a little less restrictive allows arbitrary variables to be used as the syscall nr Signed-off-by: Austin Foxley --- libc/sysdeps/linux/i386/clone.S | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libc/sysdeps/linux/i386/clone.S') diff --git a/libc/sysdeps/linux/i386/clone.S b/libc/sysdeps/linux/i386/clone.S index 14fc25ca1..a7de3fe27 100644 --- a/libc/sysdeps/linux/i386/clone.S +++ b/libc/sysdeps/linux/i386/clone.S @@ -79,7 +79,10 @@ clone: movl %eax,8(%ecx) /* Don't leak any information. */ movl $0,4(%ecx) +#ifndef RESET_PID movl $0,(%ecx) +#endif + /* Do the system call */ pushl %ebx @@ -90,6 +93,10 @@ clone: movl FLAGS+12(%esp),%ebx movl CTID+12(%esp),%edi movl $__NR_clone,%eax +#ifdef RESET_PID + /* Remember the flag value. */ + movl %ebx, (%ecx) +#endif int $0x80 popl %edi popl %esi @@ -121,3 +128,4 @@ __error: jmp __syscall_error .size clone,.-clone +weak_alias(clone, __clone) -- cgit v1.2.3