diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-03 10:13:01 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-03 10:13:01 +0000 |
commit | 010f06acf4baf7e5a21703c45ea66d7391571c48 (patch) | |
tree | 5e8e0ff1b8ef67508c71b6d34eb8971ae0677101 /libgomp | |
parent | d7a4dcc1c04e2acfd66370a1c929a5d4a944c32b (diff) | |
download | gcc-010f06acf4baf7e5a21703c45ea66d7391571c48.tar.gz |
2014-04-03 Basile Starynkevitch <basile@starynkevitch.net>
{{merge using svnmerge.py with trunk GCC 4.9 svn
rev.209052...}}
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@209053 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/config/linux/futex.h | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index d3cda25384d..c0f093ff458 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -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 diff --git a/libgomp/config/linux/futex.h b/libgomp/config/linux/futex.h index 802abfd24e2..63334c7c916 100644 --- a/libgomp/config/linux/futex.h +++ b/libgomp/config/linux/futex.h @@ -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; |