diff options
author | Darren Hart <dvhltc@us.ibm.com> | 2009-11-18 09:05:57 -0800 |
---|---|---|
committer | Darren Hart <dvhltc@us.ibm.com> | 2009-11-18 09:05:57 -0800 |
commit | 575d73ed2009174894c47d4ad4e365d28e6ab228 (patch) | |
tree | eae72cbbe07ac644ddd7a68a5b1ef0e55a196b7b | |
parent | 75d24c0f07ffc1827b46e276fd585b678bd1eb01 (diff) | |
download | futextest-575d73ed2009174894c47d4ad4e365d28e6ab228.tar.gz |
Correct futex_wake and futex_wake_bitset nr_wake argument usage
The syscall wrappers accepted a val and an nr_wake argument, while
these two calls ignore the val of the uaddr.
Reported-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
-rw-r--r-- | functional/futex_requeue_pi_mismatched_ops.c | 2 | ||||
-rw-r--r-- | include/futextest.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/functional/futex_requeue_pi_mismatched_ops.c b/functional/futex_requeue_pi_mismatched_ops.c index 50bd07b..529f5a8 100644 --- a/functional/futex_requeue_pi_mismatched_ops.c +++ b/functional/futex_requeue_pi_mismatched_ops.c @@ -113,7 +113,7 @@ int main(int argc, char *argv[]) * requeue_pi target and aborted. Wake the child with * FUTEX_WAKE. */ - ret = futex_wake(&f1, f1, 1, FUTEX_PRIVATE_FLAG); + ret = futex_wake(&f1, 1, FUTEX_PRIVATE_FLAG); if (ret == 1) ret = 0; else if (ret < 0) diff --git a/include/futextest.h b/include/futextest.h index 2b64f79..3766ad7 100644 --- a/include/futextest.h +++ b/include/futextest.h @@ -119,8 +119,8 @@ int _verbose = VCRITICAL; * futex_wake() - wake one or more tasks blocked on uaddr * @nr_wake: wake up to this many tasks */ -#define futex_wake(uaddr, val, nr_wake, opflags) \ - futex(uaddr, FUTEX_WAKE, val, NULL, NULL, nr_wake, opflags) +#define futex_wake(uaddr, nr_wake, opflags) \ + futex(uaddr, FUTEX_WAKE, nr_wake, NULL, NULL, 0, opflags) /** * futex_wait_bitset() - block on uaddr with bitset @@ -133,8 +133,8 @@ int _verbose = VCRITICAL; * futex_wake_bitset() - wake one or more tasks blocked on uaddr with bitset * @bitset: bitset to compare with that used in futex_wait_bitset */ -#define futex_wake_bitset(uaddr, val, nr_wake, bitset, opflags) \ - futex(uaddr, FUTEX_WAKE_BITSET, val, NULL, NULL, bitset, opflags) +#define futex_wake_bitset(uaddr, nr_wake, bitset, opflags) \ + futex(uaddr, FUTEX_WAKE_BITSET, nr_wake, NULL, NULL, bitset, opflags) /** * futex_lock_pi() - block on uaddr as a PI mutex |