Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
NaCl: Fix unused variable errors in lowlevellock-futex.h macros.
  • Loading branch information
Roland McGrath committed Jan 20, 2016
1 parent b274130 commit a314083
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2016-01-20 Roland McGrath <roland@hack.frob.com>

* sysdeps/nacl/lowlevellock-futex.h
(lll_futex_wait, lll_futex_timed_wait, lll_futex_wake):
Always evaluate PRIVATE argument.

2016-01-20 Paul Pluzhnikov <ppluzhnikov@google.com>

[BZ #19490]
Expand Down
7 changes: 5 additions & 2 deletions sysdeps/nacl/lowlevellock-futex.h
Expand Up @@ -35,7 +35,8 @@

/* 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 ((volatile int *) (futexp), val, NULL))
((void) (private), \
- __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) \
Expand All @@ -60,13 +61,15 @@
if (_err == 0) \
_err = __nacl_irt_futex.futex_wait_abs \
((volatile int *) (futexp), val, _to); \
-_err; \
(void) (private); \
-_err; \
})

/* Wake up up to NR waiters on FUTEXP. */
#define lll_futex_wake(futexp, nr, private) \
({ \
int _woken; \
(void) (private); \
- __nacl_irt_futex.futex_wake ((volatile int *) (futexp), nr, &_woken); \
})

Expand Down

0 comments on commit a314083

Please sign in to comment.