diff options
| author | Ulrich Drepper <drepper@redhat.com> | 2003-01-09 04:09:26 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 2003-01-09 04:09:26 +0000 |
| commit | aeeec7fb5eda5aaaa94d2e2a66780ef14a2dc57d (patch) | |
| tree | 5aeadd4b2a1aaf4b351feb5cfda95931bff7e20d | |
| parent | 51c050b0f7f8ec865e155cf34e2ace52a175d060 (diff) | |
| download | glibc-aeeec7fb5eda5aaaa94d2e2a66780ef14a2dc57d.tar.xz glibc-aeeec7fb5eda5aaaa94d2e2a66780ef14a2dc57d.zip | |
(INTERNAL_SYSCALL, INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO):
Add err argument.
(INTERNAL_SYSCALL_DECL): Define.
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/sysdep.h | 12 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/m68k/sysdep.h | 18 |
2 files changed, 19 insertions, 11 deletions
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index e7caaa1480..33ce12342a 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,93,95-99,2000,02 Free Software Foundation, Inc. +/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995. ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997. @@ -146,8 +146,11 @@ __local_syscall_error: \ } \ (int) _sys_result; }) +#undef INTERNAL_SYSCALL_DECL +#define INTERNAL_SYSCALL_DECL(err) do { } while (0) + #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, nr, args...) \ +#define INTERNAL_SYSCALL(name, err, nr, args...) \ ({ unsigned int _sys_result; \ { \ register int _a1 asm ("a1"); \ @@ -161,10 +164,11 @@ __local_syscall_error: \ (int) _sys_result; }) #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 LOAD_ARGS_0() #define ASM_ARGS_0 diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index e6fea788b6..125c584eb4 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>, December 1995. @@ -180,20 +180,23 @@ SYSCALL_ERROR_LABEL: \ call. */ #undef INLINE_SYSCALL #define INLINE_SYSCALL(name, nr, args...) \ - ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, nr, args); \ - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result), 0)) \ + ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args); \ + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0))\ { \ - __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result)); \ + __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \ _sys_result = (unsigned int) -1; \ } \ (int) _sys_result; }) +#undef INTERNAL_SYSCALL_DECL +#define INTERNAL_SYSCALL_DECL(err) do { } while (0) + /* Define a macro which expands inline into the wrapper code for a system call. This use is for internal calls that do not need to handle errors normally. It will never touch errno. This returns just what the kernel gave back. */ #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, nr, args...) \ +#define INTERNAL_SYSCALL(name, err, nr, args...) \ ({ unsigned int _sys_result; \ { \ LOAD_ARGS_##nr (args) \ @@ -207,10 +210,11 @@ SYSCALL_ERROR_LABEL: \ (int) _sys_result; }) #undef INTERNAL_SYSCALL_ERROR_P -#define INTERNAL_SYSCALL_ERROR_P(val) ((unsigned int) (val) >= -4095U) +#define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ((unsigned int) (val) >= -4095U) #undef INTERNAL_SYSCALL_ERRNO -#define INTERNAL_SYSCALL_ERRNO(val) (-(val)) +#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) #define LOAD_ARGS_0() #define ASM_ARGS_0 |
