mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-12 06:14:30 +08:00
libgomp: Fix default futex vs errno
* config/linux/futex.h (futex_wait): Get error value from errno. (futex_wake): Likewise. From-SVN: r209035
This commit is contained in:
parent
a19b0bfd98
commit
ab18f2f51c
@ -1,3 +1,8 @@
|
||||
2014-04-02 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* config/linux/futex.h (futex_wait): Get error value from errno.
|
||||
(futex_wake): Likewise.
|
||||
|
||||
2014-03-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/60331
|
||||
|
@ -41,8 +41,8 @@
|
||||
static inline void
|
||||
futex_wait (int *addr, int val)
|
||||
{
|
||||
long err = syscall (SYS_futex, addr, gomp_futex_wait, val, NULL);
|
||||
if (__builtin_expect (err == -ENOSYS, 0))
|
||||
int err = syscall (SYS_futex, addr, gomp_futex_wait, val, NULL);
|
||||
if (__builtin_expect (err < 0 && errno == ENOSYS, 0))
|
||||
{
|
||||
gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
|
||||
gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
|
||||
@ -53,8 +53,8 @@ futex_wait (int *addr, int val)
|
||||
static inline void
|
||||
futex_wake (int *addr, int count)
|
||||
{
|
||||
long err = syscall (SYS_futex, addr, gomp_futex_wake, count);
|
||||
if (__builtin_expect (err == -ENOSYS, 0))
|
||||
int err = syscall (SYS_futex, addr, gomp_futex_wake, count);
|
||||
if (__builtin_expect (err < 0 && errno == ENOSYS, 0))
|
||||
{
|
||||
gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
|
||||
gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
|
||||
|
Loading…
Reference in New Issue
Block a user