re PR libgomp/47731 (futex_wait broken on Linux)
authorJakub Jelinek <jakub@redhat.com>
Mon, 14 Feb 2011 15:08:23 +0000 (16:08 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 14 Feb 2011 15:08:23 +0000 (16:08 +0100)
PR libgomp/47731
* config/linux/futex.h (futex_wait): Pass NULL as timeout argument
to FUTEX_WAIT futex syscall.
* config/linux/wait.h: Include <futex.h> instead of "futex.h".

From-SVN: r170133

libgomp/ChangeLog
libgomp/config/linux/futex.h
libgomp/config/linux/wait.h

index 69627d3b151398b72125ad3cb4c7baea7aed2684..e28447620020d95bf6b535260ee0909c0e4f05cc 100644 (file)
@@ -1,3 +1,10 @@
+2011-02-14  Jakub Jelinek  <jakub@redhat.com>
+
+       PR libgomp/47731
+       * config/linux/futex.h (futex_wait): Pass NULL as timeout argument
+       to FUTEX_WAIT futex syscall.
+       * config/linux/wait.h: Include <futex.h> instead of "futex.h".
+
 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * configure: Regenerate.
index 7324b78383eb0c70e16d33cdb45124c7624f4799..bab088a558b615d840fad78e3cc7cf2dfe4c1f03 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2010, 2011 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of the GNU OpenMP Library (libgomp).
 static inline void
 futex_wait (int *addr, int val)
 {
-  long err = syscall (SYS_futex, addr, gomp_futex_wait, val);
+  long err = syscall (SYS_futex, addr, gomp_futex_wait, val, NULL);
   if (__builtin_expect (err == -ENOSYS, 0))
     {
       gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
       gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
-      syscall (SYS_futex, addr, gomp_futex_wait, val);
+      syscall (SYS_futex, addr, gomp_futex_wait, val, NULL);
     }
 }
 
index bd5bb637727c5c094ea76c5a9618b671750c87a6..0e8abf111b09362f41173893747f268629a1ba58 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
    This file is part of the GNU OpenMP Library (libgomp).
@@ -42,7 +42,7 @@
 
 extern long int gomp_futex_wait, gomp_futex_wake;
 
-#include "futex.h"
+#include <futex.h>
 
 static inline void do_wait (int *addr, int val)
 {