diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-03-09 06:32:58 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-03-09 06:32:58 +0000 |
commit | 6fadea9f1d26e09e7da4c4c6ae2ba976fef73c25 (patch) | |
tree | 2be99959b9b5340df51d5c2f220fb436621e9f4d /sysdeps | |
parent | c072ef6d229b1c504e0cff58371df892ec289dec (diff) | |
download | glibc-6fadea9f1d26e09e7da4c4c6ae2ba976fef73c25.zip glibc-6fadea9f1d26e09e7da4c4c6ae2ba976fef73c25.tar.gz glibc-6fadea9f1d26e09e7da4c4c6ae2ba976fef73c25.tar.bz2 |
Update.
* sysdeps/unix/sysv/linux/i386/vfork.S: If SAVE_PID and
RESTORE_PID are defined, use it.
* sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/vfork.S | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/vfork.S | 8 |
2 files changed, 17 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/vfork.S b/sysdeps/unix/sysv/linux/i386/vfork.S index e1f6df0..e660e6b 100644 --- a/sysdeps/unix/sysv/linux/i386/vfork.S +++ b/sysdeps/unix/sysv/linux/i386/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab <schwab@gnu.org>. @@ -34,6 +34,10 @@ ENTRY (__vfork) /* Pop the return PC value into ECX. */ popl %ecx +#ifdef SAVE_PID + SAVE_PID +#endif + /* Stuff the syscall number in EAX and enter into the kernel. */ movl $SYS_ify (vfork), %eax int $0x80 @@ -43,6 +47,10 @@ ENTRY (__vfork) address back on the stack. */ pushl %ecx +#ifdef RESTORE_PID + RESTORE_PID +#endif + cmpl $-4095, %eax /* Branch forward if it failed. */ # ifdef __ASSUME_VFORK_SYSCALL diff --git a/sysdeps/unix/sysv/linux/x86_64/vfork.S b/sysdeps/unix/sysv/linux/x86_64/vfork.S index 193b0bd..4bad388 100644 --- a/sysdeps/unix/sysv/linux/x86_64/vfork.S +++ b/sysdeps/unix/sysv/linux/x86_64/vfork.S @@ -32,6 +32,10 @@ ENTRY (__vfork) popq %rdi cfi_adjust_cfa_offset(-8) +#ifdef SAVE_PID + SAVE_PID +#endif + /* Stuff the syscall number in RAX and enter into the kernel. */ movl $SYS_ify (vfork), %eax syscall @@ -40,6 +44,10 @@ ENTRY (__vfork) pushq %rdi cfi_adjust_cfa_offset(8) +#ifdef RESTORE_PID + RESTORE_PID +#endif + cmpl $-4095, %eax jae SYSCALL_ERROR_LABEL /* Branch forward if it failed. */ |