diff options
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S b/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S index e45165e37b..fcc7ee0804 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S +++ b/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003. @@ -22,6 +22,7 @@ #include <bits/errno.h> #include <kernel-features.h> #include <bits/wordsize.h> +#include <tcb-offsets.h> /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is @@ -29,9 +30,21 @@ and the process ID of the new process to the old process. */ ENTRY (__vfork) + + ear %r4,%a0 + sllg %r4,%r4,32 + ear %r4,%a1 + l %r3,PID(%r4) + lcr %r1,%r3 + st %r1,PID(%r4) + /* Do vfork system call. */ svc SYS_ify (vfork) + ltgr %r2,%r2 + je 1f + st %r3,PID(%r4) +1: /* Check for error. */ lghi %r4,-4095 clgr %r2,%r4 |