mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 16:21:06 +00:00
*** empty log message ***
2002-12-21 Andreas Schwab <schwab@suse.de> * sysdeps/unix/sysv/linux/m68k/sysdep.h (INTERNAL_SYSCALL): Define. (INLINE_SYSCALL): Use it. (INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): Define. * sysdeps/unix/sysv/linux/m68k/getpagesize.c: Use INTERNAL_SYSCALL. * sysdeps/unix/sysv/linux/m68k/brk.c: Likewise.
This commit is contained in:
parent
1332e84802
commit
257757f8b0
@ -1,3 +1,12 @@
|
|||||||
|
2002-12-21 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/m68k/sysdep.h (INTERNAL_SYSCALL): Define.
|
||||||
|
(INLINE_SYSCALL): Use it.
|
||||||
|
(INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): Define.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/m68k/getpagesize.c: Use INTERNAL_SYSCALL.
|
||||||
|
* sysdeps/unix/sysv/linux/m68k/brk.c: Likewise.
|
||||||
|
|
||||||
2002-12-20 Art Haas <ahaas@airmail.net>
|
2002-12-20 Art Haas <ahaas@airmail.net>
|
||||||
|
|
||||||
* sysdeps/gnu/siglist.c: Convert GCC extension initializer
|
* sysdeps/gnu/siglist.c: Convert GCC extension initializer
|
||||||
|
@ -163,7 +163,21 @@ SYSCALL_ERROR_LABEL: \
|
|||||||
/* Define a macro which expands into the inline wrapper code for a system
|
/* Define a macro which expands into the inline wrapper code for a system
|
||||||
call. */
|
call. */
|
||||||
#undef INLINE_SYSCALL
|
#undef INLINE_SYSCALL
|
||||||
#define INLINE_SYSCALL(name, nr, args...) \
|
#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)) \
|
||||||
|
{ \
|
||||||
|
__set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result)); \
|
||||||
|
_sys_result = (unsigned int) -1; \
|
||||||
|
} \
|
||||||
|
(int) _sys_result; })
|
||||||
|
|
||||||
|
/* 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...) \
|
||||||
({ unsigned int _sys_result; \
|
({ unsigned int _sys_result; \
|
||||||
{ \
|
{ \
|
||||||
LOAD_ARGS_##nr (args) \
|
LOAD_ARGS_##nr (args) \
|
||||||
@ -174,13 +188,14 @@ SYSCALL_ERROR_LABEL: \
|
|||||||
: "memory"); \
|
: "memory"); \
|
||||||
_sys_result = _d0; \
|
_sys_result = _d0; \
|
||||||
} \
|
} \
|
||||||
if (_sys_result >= (unsigned int) -4095) \
|
|
||||||
{ \
|
|
||||||
__set_errno (-_sys_result); \
|
|
||||||
_sys_result = (unsigned int) -1; \
|
|
||||||
} \
|
|
||||||
(int) _sys_result; })
|
(int) _sys_result; })
|
||||||
|
|
||||||
|
#undef INTERNAL_SYSCALL_ERROR_P
|
||||||
|
#define INTERNAL_SYSCALL_ERROR_P(val) ((unsigned int) (val) >= -4095U)
|
||||||
|
|
||||||
|
#undef INTERNAL_SYSCALL_ERRNO
|
||||||
|
#define INTERNAL_SYSCALL_ERRNO(val) (-(val))
|
||||||
|
|
||||||
#define LOAD_ARGS_0()
|
#define LOAD_ARGS_0()
|
||||||
#define ASM_ARGS_0
|
#define ASM_ARGS_0
|
||||||
#define LOAD_ARGS_1(a1) \
|
#define LOAD_ARGS_1(a1) \
|
||||||
|
Loading…
Reference in New Issue
Block a user