mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
1999-01-13 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/syscalls.list: Add __syscall_fork alias. * sysdeps/unix/sysv/linux/vfork.c: Use vfork syscall if available, otherwise use fork. * sysdeps/unix/sysv/linux/powerpc/syscalls.list: Add vfork. * sysdeps/unix/sysv/linux/sparc32/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Correct handling of INLINE_SYSCALL for syscall without parameters.
This commit is contained in:
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
1999-01-13 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/syscalls.list: Add __syscall_fork alias.
|
||||||
|
* sysdeps/unix/sysv/linux/vfork.c: Use vfork syscall if available,
|
||||||
|
otherwise use fork.
|
||||||
|
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Add vfork.
|
||||||
|
* sysdeps/unix/sysv/linux/sparc32/syscalls.list: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sparc64/syscalls.list: Likewise.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/i386/sysdep.h: Correct handling of
|
||||||
|
INLINE_SYSCALL for syscall without parameters.
|
||||||
|
|
||||||
1999-01-13 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
1999-01-13 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
||||||
|
|
||||||
* sysdeps/unix/make-syscalls.sh: Set shared-only-routines for
|
* sysdeps/unix/make-syscalls.sh: Set shared-only-routines for
|
||||||
|
@ -67,6 +67,8 @@ db.c.texi \
|
|||||||
sysinfo.texi \
|
sysinfo.texi \
|
||||||
conf.texi \
|
conf.texi \
|
||||||
../crypt/crypt.texi \
|
../crypt/crypt.texi \
|
||||||
|
../crypt/genpass.c.texi \
|
||||||
|
../crypt/testpass.c.texi \
|
||||||
../linuxthreads/linuxthreads.texi \
|
../linuxthreads/linuxthreads.texi \
|
||||||
lang.texi \
|
lang.texi \
|
||||||
add.c.texi \
|
add.c.texi \
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* Copyright (C) 1992, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
|
/* Copyright (C) 1992, 93, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
|
Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
@ -243,11 +243,10 @@ asm (".L__X'%ebx = 1\n\t"
|
|||||||
({ \
|
({ \
|
||||||
unsigned int resultvar; \
|
unsigned int resultvar; \
|
||||||
asm volatile ( \
|
asm volatile ( \
|
||||||
"bpushl .L__X'%k2, %k2\n\t" \
|
LOADARGS_##nr \
|
||||||
"bmovl .L__X'%k2, %k2\n\t" \
|
|
||||||
"movl %1, %%eax\n\t" \
|
"movl %1, %%eax\n\t" \
|
||||||
"int $0x80\n\t" \
|
"int $0x80\n\t" \
|
||||||
"bpopl .L__X'%k2, %k2\n\t" \
|
RESTOREARGS_##nr \
|
||||||
: "=a" (resultvar) \
|
: "=a" (resultvar) \
|
||||||
: "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \
|
: "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \
|
||||||
if (resultvar >= 0xfffff001) \
|
if (resultvar >= 0xfffff001) \
|
||||||
@ -257,6 +256,23 @@ asm (".L__X'%ebx = 1\n\t"
|
|||||||
} \
|
} \
|
||||||
(int) resultvar; })
|
(int) resultvar; })
|
||||||
|
|
||||||
|
#define LOADARGS_0
|
||||||
|
#define LOADARGS_1 \
|
||||||
|
"bpushl .L__X'%k2, %k2\n\t" \
|
||||||
|
"bmovl .L__X'%k2, %k2\n\t"
|
||||||
|
#define LOADARGS_2 LOADARGS_1
|
||||||
|
#define LOADARGS_3 LOADARGS_1
|
||||||
|
#define LOADARGS_4 LOADARGS_1
|
||||||
|
#define LOADARGS_5 LOADARGS_1
|
||||||
|
|
||||||
|
#define RESTOREARGS_0
|
||||||
|
#define RESTOREARGS_1 \
|
||||||
|
"bpopl .L__X'%k2, %k2\n\t"
|
||||||
|
#define RESTOREARGS_2 RESTOREARGS_1
|
||||||
|
#define RESTOREARGS_3 RESTOREARGS_1
|
||||||
|
#define RESTOREARGS_4 RESTOREARGS_1
|
||||||
|
#define RESTOREARGS_5 RESTOREARGS_1
|
||||||
|
|
||||||
#define ASMFMT_0()
|
#define ASMFMT_0()
|
||||||
#define ASMFMT_1(arg1) \
|
#define ASMFMT_1(arg1) \
|
||||||
, "acdSD" (arg1)
|
, "acdSD" (arg1)
|
||||||
|
@ -27,6 +27,7 @@ s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
|
|||||||
s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
|
s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
|
||||||
s_sysctl sysctl _sysctl 1 __syscall__sysctl
|
s_sysctl sysctl _sysctl 1 __syscall__sysctl
|
||||||
s_ustat ustat ustat 2 __syscall_ustat
|
s_ustat ustat ustat 2 __syscall_ustat
|
||||||
|
s_vfork vfork vfork 0 __syscall_vfork
|
||||||
sys_fstat fxstat fstat 2 __syscall_fstat
|
sys_fstat fxstat fstat 2 __syscall_fstat
|
||||||
sys_lstat lxstat lstat 2 __syscall_lstat
|
sys_lstat lxstat lstat 2 __syscall_lstat
|
||||||
sys_mknod xmknod mknod 3 __syscall_mknod
|
sys_mknod xmknod mknod 3 __syscall_mknod
|
||||||
|
@ -37,6 +37,7 @@ s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
|
|||||||
s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
|
s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
|
||||||
s_sysctl sysctl _sysctl 1 __syscall__sysctl
|
s_sysctl sysctl _sysctl 1 __syscall__sysctl
|
||||||
s_ustat ustat ustat 2 __syscall_ustat
|
s_ustat ustat ustat 2 __syscall_ustat
|
||||||
|
s_vfork vfork vfork 0 __syscall_vfork
|
||||||
sys_fstat fxstat fstat 2 __syscall_fstat
|
sys_fstat fxstat fstat 2 __syscall_fstat
|
||||||
sys_lstat lxstat lstat 2 __syscall_lstat
|
sys_lstat lxstat lstat 2 __syscall_lstat
|
||||||
sys_mknod xmknod mknod 3 __syscall_mknod
|
sys_mknod xmknod mknod 3 __syscall_mknod
|
||||||
|
@ -56,6 +56,7 @@ s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
|
|||||||
s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
|
s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
|
||||||
s_sysctl sysctl _sysctl 1 __syscall__sysctl
|
s_sysctl sysctl _sysctl 1 __syscall__sysctl
|
||||||
s_ustat ustat ustat 2 __syscall_ustat
|
s_ustat ustat ustat 2 __syscall_ustat
|
||||||
|
s_vfork vfork vfork 0 __syscall_vfork
|
||||||
sys_fstat fxstat fstat 2 __syscall_fstat
|
sys_fstat fxstat fstat 2 __syscall_fstat
|
||||||
sys_lstat lxstat lstat 2 __syscall_lstat
|
sys_lstat lxstat lstat 2 __syscall_lstat
|
||||||
sys_mknod xmknod mknod 3 __syscall_mknod
|
sys_mknod xmknod mknod 3 __syscall_mknod
|
||||||
|
@ -8,7 +8,7 @@ create_module EXTRA create_module 3 create_module
|
|||||||
delete_module EXTRA delete_module 3 delete_module
|
delete_module EXTRA delete_module 3 delete_module
|
||||||
fdatasync - fdatasync 1 fdatasync
|
fdatasync - fdatasync 1 fdatasync
|
||||||
flock - flock 2 __flock flock
|
flock - flock 2 __flock flock
|
||||||
fork - fork 0 __fork fork
|
fork - fork 0 __syscall_fork __fork fork
|
||||||
get_kernel_syms EXTRA get_kernel_syms 1 get_kernel_syms
|
get_kernel_syms EXTRA get_kernel_syms 1 get_kernel_syms
|
||||||
getegid - getegid 0 __getegid getegid
|
getegid - getegid 0 __getegid getegid
|
||||||
geteuid - geteuid 0 __geteuid geteuid
|
geteuid - geteuid 0 __geteuid geteuid
|
||||||
|
@ -1 +1,50 @@
|
|||||||
#include <sysdeps/generic/vfork.c>
|
/* Copyright (C) 1992, 1995, 1997, 1999 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <sysdep.h>
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
|
||||||
|
extern pid_t __syscall_fork __P ((void));
|
||||||
|
|
||||||
|
#ifdef __NR_vfork
|
||||||
|
extern pid_t __syscall_vfork __P ((void));
|
||||||
|
|
||||||
|
/* Use the system call. If it's not available, fork is close enough. */
|
||||||
|
|
||||||
|
pid_t
|
||||||
|
__vfork __P ((void))
|
||||||
|
{
|
||||||
|
pid_t retval = INLINE_SYSCALL (vfork, 0);
|
||||||
|
|
||||||
|
if (retval == (pid_t) -1 && errno == ENOSYS)
|
||||||
|
retval = INLINE_SYSCALL (fork, 0);
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
pid_t
|
||||||
|
__vfork __P ((void))
|
||||||
|
{
|
||||||
|
return INLINE_SYSCALL (fork, 0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
weak_alias (__vfork, vfork)
|
||||||
|
Reference in New Issue
Block a user