Skip to content
Snippets Groups Projects
Commit 53b4d41d authored by Jakub Jelinek's avatar Jakub Jelinek Committed by Jakub Jelinek
Browse files

re PR libgomp/47731 (futex_wait broken on Linux)

	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
parent fa0a5acc
No related branches found
No related tags found
No related merge requests found
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> 2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate. * configure: Regenerate.
......
/* Copyright (C) 2010 Free Software Foundation, Inc. /* Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by ARM Ltd. Contributed by ARM Ltd.
This file is part of the GNU OpenMP Library (libgomp). This file is part of the GNU OpenMP Library (libgomp).
...@@ -41,12 +41,12 @@ ...@@ -41,12 +41,12 @@
static inline void static inline void
futex_wait (int *addr, int val) 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)) if (__builtin_expect (err == -ENOSYS, 0))
{ {
gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG; gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
gomp_futex_wake &= ~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);
} }
} }
......
/* Copyright (C) 2008, 2009 Free Software Foundation, Inc. /* Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
Contributed by Jakub Jelinek <jakub@redhat.com>. Contributed by Jakub Jelinek <jakub@redhat.com>.
This file is part of the GNU OpenMP Library (libgomp). This file is part of the GNU OpenMP Library (libgomp).
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
extern long int gomp_futex_wait, gomp_futex_wake; extern long int gomp_futex_wait, gomp_futex_wake;
#include "futex.h" #include <futex.h>
static inline void do_wait (int *addr, int val) static inline void do_wait (int *addr, int val)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment