diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/brk.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sigaction.c | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sysdep.h | 22 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/system.c | 5 |
4 files changed, 24 insertions, 20 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/brk.c b/sysdeps/unix/sysv/linux/i386/brk.c index c71a1fbf08..1d26439ede 100644 --- a/sysdeps/unix/sysv/linux/i386/brk.c +++ b/sysdeps/unix/sysv/linux/i386/brk.c @@ -1,5 +1,5 @@ /* brk system call for Linux/i386. - Copyright (C) 1995, 1996, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 2000, 2002, 2003 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 @@ -36,7 +36,9 @@ __brk (void *addr) { void *__unbounded newbrk; - newbrk = (void *__unbounded) INTERNAL_SYSCALL (brk, 1, __ptrvalue (addr)); + INTERNAL_SYSCALL_DECL (err); + newbrk = (void *__unbounded) INTERNAL_SYSCALL (brk, err, 1, + __ptrvalue (addr)); __curbrk = newbrk; diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c index 18a5f1ee65..c2f0a0f5d1 100644 --- a/sysdeps/unix/sysv/linux/i386/sigaction.c +++ b/sysdeps/unix/sysv/linux/i386/sigaction.c @@ -131,15 +131,12 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) k_newact.sa_restorer = &restore; } - result = INTERNAL_SYSCALL (sigaction, 3, sig, - act ? __ptrvalue (&k_newact) : 0, - oact ? __ptrvalue (&k_oldact) : 0); + result = INLINE_SYSCALL (sigaction, 3, sig, + act ? __ptrvalue (&k_newact) : 0, + oact ? __ptrvalue (&k_oldact) : 0); if (result < 0) - { - __set_errno (-result); - return -1; - } + return -1; if (oact) { diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 25208a00a8..02a78d3514 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,93,95,96,97,98,99,2000,02 Free Software Foundation, Inc. +/* Copyright (C) 1992,1993,1995-2000,2002,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995. @@ -313,10 +313,10 @@ asm (".L__X'%ebx = 1\n\t" #undef INLINE_SYSCALL #define INLINE_SYSCALL(name, nr, args...) \ ({ \ - unsigned int resultvar = INTERNAL_SYSCALL (name, nr, args); \ - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (resultvar), 0)) \ + unsigned int resultvar = INTERNAL_SYSCALL (name, , nr, args); \ + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (resultvar, ), 0)) \ { \ - __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar)); \ + __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, )); \ resultvar = 0xffffffff; \ } \ (int) resultvar; }) @@ -328,7 +328,7 @@ asm (".L__X'%ebx = 1\n\t" #undef INTERNAL_SYSCALL #ifdef I386_USE_SYSENTER # ifdef SHARED -# define INTERNAL_SYSCALL(name, nr, args...) \ +# define INTERNAL_SYSCALL(name, err, nr, args...) \ ({ \ unsigned int resultvar; \ asm volatile ( \ @@ -341,7 +341,7 @@ asm (".L__X'%ebx = 1\n\t" ASMFMT_##nr(args) : "memory", "cc"); \ (int) resultvar; }) # else -# define INTERNAL_SYSCALL(name, nr, args...) \ +# define INTERNAL_SYSCALL(name, err, nr, args...) \ ({ \ unsigned int resultvar; \ asm volatile ( \ @@ -354,7 +354,7 @@ asm (".L__X'%ebx = 1\n\t" (int) resultvar; }) # endif #else -# define INTERNAL_SYSCALL(name, nr, args...) \ +# define INTERNAL_SYSCALL(name, err, nr, args...) \ ({ \ unsigned int resultvar; \ asm volatile ( \ @@ -367,11 +367,15 @@ asm (".L__X'%ebx = 1\n\t" (int) resultvar; }) #endif +#undef INTERNAL_SYSCALL_DECL +#define INTERNAL_SYSCALL_DECL(err) do { } while (0) + #undef INTERNAL_SYSCALL_ERROR_P -#define INTERNAL_SYSCALL_ERROR_P(val) ((unsigned int) (val) >= 0xfffff001u) +#define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ((unsigned int) (val) >= 0xfffff001u) #undef INTERNAL_SYSCALL_ERRNO -#define INTERNAL_SYSCALL_ERRNO(val) (-(val)) +#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) #define LOADARGS_0 #if defined I386_USE_SYSENTER && defined SHARED diff --git a/sysdeps/unix/sysv/linux/i386/system.c b/sysdeps/unix/sysv/linux/i386/system.c index 69eb2cd2ad..a171541790 100644 --- a/sysdeps/unix/sysv/linux/i386/system.c +++ b/sysdeps/unix/sysv/linux/i386/system.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 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 @@ -56,7 +56,8 @@ cancel_handler (void *arg) { pid_t child = *(pid_t *) arg; - INTERNAL_SYSCALL (kill, 2, child, SIGKILL); + INTERNAL_SYSCALL_DECL (err); + INTERNAL_SYSCALL (kill, err, 2, child, SIGKILL); TEMP_FAILURE_RETRY (__waitpid (child, NULL, 0)); |