diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-01-12 23:13:14 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-01-12 23:13:14 +0000 |
commit | 73398a44bb09014adee1e967a275067a046fe054 (patch) | |
tree | f92ac84dbc5e69b0cae7480f69893ec01159b948 /linuxthreads/sysdeps/unix | |
parent | b2608c22036ee37754d87185c29a0b986b7e70c6 (diff) | |
download | glibc-73398a44bb09014adee1e967a275067a046fe054.tar glibc-73398a44bb09014adee1e967a275067a046fe054.tar.gz glibc-73398a44bb09014adee1e967a275067a046fe054.tar.bz2 glibc-73398a44bb09014adee1e967a275067a046fe054.zip |
Update.
* Makerules (build-shlib-helper): Don't use -z defs linker option
if no-z-defs is defined either.
2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
* sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h: Remove unused
file.
2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
* sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list: Add vfork.
* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
2003-01-12 Ulrich Drepper <drepper@redhat.com>
Diffstat (limited to 'linuxthreads/sysdeps/unix')
4 files changed, 121 insertions, 17 deletions
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h index 753fdd93f5..9e856a4d0e 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h +++ b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h @@ -38,21 +38,22 @@ ENTRY(name) \ br %r14; \ L(pseudo_cancel): \ STM_##args \ - stm %r13,%r15,52(%r15); \ + stm %r12,%r15,48(%r15); \ + lr %r14,%r15; \ ahi %r15,-96; \ + st %r14,0(%r15); \ basr %r13,0; \ 200301: l %r1,200302f-200301b(%r13); \ - bas %r14,0(%r13,%r1); \ + bas %r14,0(%r1,%r13); \ lr %r0,%r2; \ LM_##args \ DO_CALL(syscall_name, args); \ - l %r3,200303f-200301b(%r13); \ - lr %r4,%r13; \ - lr %r13,%r2; \ + l %r1,200303f-200301b(%r13); \ + lr %r12,%r2; \ lr %r2,%r0; \ - bas %r14,0(%r4,%r3); \ - lr %r2,%r13; \ - lm %r13,%r15,52+96(%r15); \ + bas %r14,0(%r1,%r13); \ + lr %r2,%r12; \ + lm %r12,%r15,48+96(%r15); \ lhi %r4,-4095; \ clr %r2,%r4; \ jnl SYSCALL_ERROR_LABEL; \ diff --git a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S new file mode 100644 index 0000000000..60477231a8 --- /dev/null +++ b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S @@ -0,0 +1,54 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com> + + 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-cancel.h> +#define _ERRNO_H 1 +#include <bits/errno.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) + SINGLE_THREAD_P + jne 0f + + /* Do vfork system call. */ + svc SYS_ify (vfork) + + /* Check for error. */ + lhi %r4,-4095 + clr %r2,%r4 + jnl SYSCALL_ERROR_LABEL + + /* Normal return. */ + br %r14 +0: + basr %r1,0 +1: + l %r1,2f-1b(%r1) + br %r1 +2: + .long HIDDEN_JUMPTARGET(__fork) +PSEUDO_END(__vfork) + +libc_hidden_def (__vfork) + +weak_alias (__vfork, vfork) diff --git a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h index 0e3daa5d31..19ecee80ec 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h +++ b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h @@ -39,16 +39,18 @@ ENTRY(name) \ L(pseudo_cancel): \ STM_##args \ stmg %r13,%r15,104(%r15); \ - aghi %r15,-192; \ + lgr %r14,%r15; \ + aghi %r15,-160; \ + stg %r14,0(%r15); \ brasl %r14,CENABLE; \ - lr %r0,%r2; \ + lgr %r0,%r2; \ LM_##args \ DO_CALL(syscall_name, args); \ lgr %r13,%r2; \ - lr %r2,%r0; \ + lgr %r2,%r0; \ brasl %r14,CDISABLE; \ lgr %r2,%r13; \ - lmg %r13,%r15,104+192(%r15); \ + lmg %r13,%r15,104+160(%r15); \ lghi %r4,-4095; \ clgr %r2,%r4; \ jnl SYSCALL_ERROR_LABEL; \ @@ -72,11 +74,11 @@ L(pseudo_end): #define STM_5 stmg %r2,%r5,16(%r15); #define LM_0 /* Nothing */ -#define LM_1 lg %r2,16+192(%r15); -#define LM_2 lmg %r2,%r3,16+192(%r15); -#define LM_3 lmg %r2,%r4,16+192(%r15); -#define LM_4 lmg %r2,%r5,16+192(%r15); -#define LM_5 lmg %r2,%r5,16+192(%r15); +#define LM_1 lg %r2,16+160(%r15); +#define LM_2 lmg %r2,%r3,16+160(%r15); +#define LM_3 lmg %r2,%r4,16+160(%r15); +#define LM_4 lmg %r2,%r5,16+160(%r15); +#define LM_5 lmg %r2,%r5,16+160(%r15); # ifndef __ASSEMBLER__ extern int __local_multiple_threads attribute_hidden; diff --git a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S new file mode 100644 index 0000000000..e01d4389d3 --- /dev/null +++ b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S @@ -0,0 +1,47 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com> + + 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-cancel.h> +#define _ERRNO_H 1 +#include <bits/errno.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) + SINGLE_THREAD_P + jgne HIDDEN_JUMPTARGET(__fork) + + /* Do vfork system call. */ + svc SYS_ify (vfork) + + /* Check for error. */ + lghi %r4,-4095 + clgr %r2,%r4 + jnl SYSCALL_ERROR_LABEL + + /* Normal return. */ + br %r14 +PSEUDO_END(__vfork) + +libc_hidden_def (__vfork) + +weak_alias (__vfork, vfork) |