[Devel] [PATCH 4/4] cr_tests: futex: pi: Set the FUTEX_WAITERS bit.
Matt Helsley
matthltc at us.ibm.com
Tue Apr 13 15:25:15 PDT 2010
Need to indicate to the kernel that we're waiting on the futex.
(See kernel source Documentation/pi-futex.txt).
Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
---
futex/pi.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/futex/pi.c b/futex/pi.c
index a39964d..695eb0a 100644
--- a/futex/pi.c
+++ b/futex/pi.c
@@ -271,6 +271,7 @@ int do_lock_contended_pi_futex(int retries)
{
int do_print = 1;
+ __sync_or_and_fetch(&pi_futex->counter, FUTEX_WAITERS);
again:
if (futex(&pi_futex->counter, FUTEX_LOCK_PI, atomic_read(pi_futex),
NULL, NULL, 0) == 0)
--
1.6.3.3
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list