summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h')
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
index c26d3f1307..c8d1cdd698 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000,01,02 Free Software Foundation, Inc.
+/* Copyright (C) 2000,01,02,03 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
@@ -121,33 +121,37 @@
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ \
- unsigned int err = INTERNAL_SYSCALL (name, nr, args); \
- if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (err), 0)) \
+ unsigned int _ret = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_ret, ), 0)) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (err)); \
- err = 0xffffffff; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_ret, )); \
+ _ret = 0xffffffff; \
} \
- (int) err; })
+ (int) _ret; })
+
+#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...) \
({ \
DECLARGS_##nr(args) \
- int err; \
+ int _ret; \
asm volatile ( \
LOADARGS_##nr \
"svc %b1\n\t" \
"lr %0,%%r2\n\t" \
- : "=d" (err) \
+ : "=d" (_ret) \
: "I" (__NR_##name) ASMFMT_##nr \
: "memory", "cc", "2", "3", "4", "5", "6"); \
- (int) err; })
+ (int) _ret; })
#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 DECLARGS_0()
#define DECLARGS_1(arg1) \