summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/s390
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-10 19:28:58 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-10 19:28:58 +0000
commitd3a4a571c42d14ad2dfbe8c06bdf02b74d012e94 (patch)
tree2b49bf028e14d47dd3def04e43311eeb8137aeda /nptl/sysdeps/unix/sysv/linux/s390
parent78678039a4c4575cbb48c9577b4796cf2a05af62 (diff)
Update.
2004-03-10 Jakub Jelinek <jakub@redhat.com> * include/libc-symbols.h [__ASSEMBLY__] (compat_text_section, compat_data_section): Define. * sysdeps/unix/sysv/linux/alpha/adjtime.c (ADJTIME): Add attribute_compat_text_section. * sysdeps/unix/sysv/linux/alpha/wordexp.c (__old_wordexp): Likewise. * sysdeps/unix/sysv/linux/alpha/oldglob.c (__old_glob, __old_globfree): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/chown.c (__chown_is_lchown): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c (__posix_fadvise64_l32): Likewise. * sysdeps/unix/sysv/linux/msgctl.c (__old_msgctl): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise64.c (__posix_fadvise64_l32): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c (__old_semctl): Likewise. * sysdeps/unix/sysv/linux/semctl.c (__old_semctl): Likewise. * sysdeps/unix/sysv/linux/posix_fadvise64.c (__posix_fadvise64_l32): Likewise. * sysdeps/unix/sysv/linux/shmctl.c (__old_shmctl): Likewise. * hurd/compat-20.c (_hurd_proc_init_compat_20): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S (__swapcontext, __novec_swapcontext): Use END instead of PSEUDO_END. (__novec_swapcontext, __swapcontext_stub): Add compat_text_section. * sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S (__makecontext_stub): Likewise. (__novec_makecontext): Likewise. Fix name in END () to match function name. * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S (__setcontext): Use END instead of PSEUDO_END. (__novec_setcontext): Add compat_text_section. Use END instead of PSEUDO_END, fix the name in END () to match function name. * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S (__getcontext, __novec_getcontext): Use END instead of PSEUDO_END. (__novec_getcontext, __getcontext_stub): Add compat_text_section. 2004-03-10 Kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/sh/dl-machine.h: Don't use GL macro if not appropriate. (COPY_UNALIGNED_WORD): Remove cast used as lvalue. 2004-03-10 Ulrich Drepper <drepper@redhat.com> * sysdeps/i386/dl-procinfo.h (HWCAP_IMPORTANT): Remove mmx, add sse2.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/s390')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S10
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S57
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S15
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S59
4 files changed, 140 insertions, 1 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S b/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S
index 67a5bc6613..60d6dbdef6 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S
+++ b/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S
@@ -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,18 @@
and the process ID of the new process to the old process. */
ENTRY (__vfork)
+ ear %r4,%a0
+ l %r3,PID(%r4)
+ lcr %r1,%r3
+ st %r1,PID(%r4)
+
/* Do vfork system call. */
svc SYS_ify (vfork)
+ ltr %r2,%r2
+ je 1f
+ st %r3,PID(%r4)
+1:
/* Check for error. */
lhi %r4,-4095
clr %r2,%r4
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S b/nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S
new file mode 100644
index 0000000000..2dca28fb6f
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S
@@ -0,0 +1,57 @@
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#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
+ replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
+ and the process ID of the new process to the old process. */
+
+ENTRY (__vfork)
+ ear %r4,%a0
+ lhi %r1,1
+ icm %r3,15,PID(%r4)
+ sll %r1,31
+ je 1f
+ lcr %r1,%r3
+1: st %r1,PID(%r4)
+
+ /* Do vfork system call. */
+ svc SYS_ify (vfork)
+
+ ltr %r2,%r2
+ je 1f
+ st %r3,PID(%r4)
+1:
+ /* Check for error. */
+ lhi %r4,-4095
+ clr %r2,%r4
+ jnl SYSCALL_ERROR_LABEL
+
+ /* Normal return. */
+ br %r14
+PSEUDO_END(__vfork)
+
+weak_alias (__vfork, vfork)
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
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S b/nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S
new file mode 100644
index 0000000000..c73d849f25
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S
@@ -0,0 +1,59 @@
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#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
+ replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
+ and the process ID of the new process to the old process. */
+
+ENTRY (__vfork)
+
+ ear %r4,%a0
+ sllg %r4,%r4,32
+ ear %r4,%a1
+ icm %r3,15,PID(%r4)
+ llilh %r1,32768
+ je 1f
+ lcr %r1,%r3
+1: 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
+ jnl SYSCALL_ERROR_LABEL
+
+ /* Normal return. */
+ br %r14
+PSEUDO_END(__vfork)
+
+weak_alias (__vfork, vfork)