summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-12-17 10:34:26 -0800
committerRoland McGrath <roland@hack.frob.com>2014-12-17 10:34:26 -0800
commitb297a3d5132f512c9c1712d90fdf399011a6eb63 (patch)
tree9822fee4676cc2857a83b1635238ef4fc0db7b56
parent0f4ffde865f93f55600d54fc8363c6ef8d5ea7ef (diff)
downloadglibc-b297a3d5132f512c9c1712d90fdf399011a6eb63.tar.gz
Hack up futex layer to get things building again.
-rw-r--r--sysdeps/nacl/lowlevellock-futex.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/sysdeps/nacl/lowlevellock-futex.h b/sysdeps/nacl/lowlevellock-futex.h
index 85fd9b4299..ec856dfa35 100644
--- a/sysdeps/nacl/lowlevellock-futex.h
+++ b/sysdeps/nacl/lowlevellock-futex.h
@@ -23,15 +23,19 @@
#include <time.h>
+#pragma GCC diagnostic ignored "-Wunused-value" /* XXX */
+
/* Values for 'private' parameter of locking macros. Note pthreadP.h
optimizes for these exact values, though they are not required. */
#define LLL_PRIVATE 0
#define LLL_SHARED 128
+#define FUTEX_PRIVATE_FLAG 0 /* XXX */
+
/* Wait while *FUTEXP == VAL for an lll_futex_wake call on FUTEXP. */
#define lll_futex_wait(futexp, val, private) \
- (- __nacl_irt_futex.futex_wait_abs (futexp, val, NULL))
+ (- __nacl_irt_futex.futex_wait_abs ((volatile int *) (futexp), val, NULL))
/* Wait until a lll_futex_wake call on FUTEXP, or TIMEOUT elapses. */
#define lll_futex_timed_wait(futexp, val, timeout, private) \
@@ -54,7 +58,8 @@
_to = &_ts; \
} \
if (_err == 0) \
- _err = __nacl_irt_futex.futex_wait_abs (futexp, val, _to); \
+ _err = __nacl_irt_futex.futex_wait_abs \
+ ((volatile int *) (futexp), val, _to); \
-_err; \
})
@@ -62,7 +67,7 @@
#define lll_futex_wake(futexp, nr, private) \
({ \
int _woken; \
- - __nacl_irt_futex.futex_wake (futexp, nr, &_woken); \
+ - __nacl_irt_futex.futex_wake ((volatile int *) (futexp), nr, &_woken); \
})
/* NaCl does not support the requeue operation. The only use of this is in