diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2021-02-12 00:07:56 +0100 |
---|---|---|
committer | Uros Bizjak <ubizjak@gmail.com> | 2021-02-12 00:07:56 +0100 |
commit | 5e40542f878127a1dd0421831c03cda1b977f2a0 (patch) | |
tree | 140c99a6b23345ab632f58cb37bdb0876d4d063a /libgomp | |
parent | c36ad24e8a4098e2b3e59f682a6ae751d656102c (diff) | |
download | gcc-5e40542f878127a1dd0421831c03cda1b977f2a0.tar.gz |
libgomp/i386: Revert the type of syscall wrappers output back to long.
Linux man-pages 5.07 wrongly declares syscall output type as int. This error
was fixed in release 5.10, so this patch reverts my recent change.
2021-02-11 Uroš Bizjak <ubizjak@gmail.com>
libgomp/
* config/linux/x86/futex.h (__futex_wait):
Revert output type back to long.
(__futex_wake): Ditto.
(futex_wait): Update for revert.
(futex_wake): Ditto.
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/config/linux/x86/futex.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libgomp/config/linux/x86/futex.h b/libgomp/config/linux/x86/futex.h index 7807e88e2e0..e7f53399a4e 100644 --- a/libgomp/config/linux/x86/futex.h +++ b/libgomp/config/linux/x86/futex.h @@ -30,10 +30,10 @@ # define SYS_futex 202 # endif -static inline int +static inline long __futex_wait (int *addr, int futex_op, int val) { - int res; + long res; register void *timeout __asm ("r10") = NULL; __asm volatile ("syscall" @@ -44,10 +44,10 @@ __futex_wait (int *addr, int futex_op, int val) return res; } -static inline int +static inline long __futex_wake (int *addr, int futex_op, int count) { - int res; + long res; __asm volatile ("syscall" : "=a" (res) @@ -61,10 +61,10 @@ __futex_wake (int *addr, int futex_op, int count) # define SYS_futex 240 # endif -static inline int +static inline long __futex_wait (int *addr, int futex_op, int val) { - int res; + long res; void *timeout = NULL; __asm volatile ("int $0x80" @@ -75,10 +75,10 @@ __futex_wait (int *addr, int futex_op, int val) return res; } -static inline int +static inline long __futex_wake (int *addr, int futex_op, int count) { - int res; + long res; __asm volatile ("int $0x80" : "=a" (res) @@ -92,9 +92,9 @@ __futex_wake (int *addr, int futex_op, int count) static inline void futex_wait (int *addr, int val) { - int res = __futex_wait (addr, gomp_futex_wait, val); + long err = __futex_wait (addr, gomp_futex_wait, val); - if (__builtin_expect (res == -ENOSYS, 0)) + if (__builtin_expect (err == -ENOSYS, 0)) { gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG; gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG; @@ -106,9 +106,9 @@ futex_wait (int *addr, int val) static inline void futex_wake (int *addr, int count) { - int res = __futex_wake (addr, gomp_futex_wake, count); + long err = __futex_wake (addr, gomp_futex_wake, count); - if (__builtin_expect (res == -ENOSYS, 0)) + if (__builtin_expect (err == -ENOSYS, 0)) { gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG; gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG; |