aboutsummaryrefslogtreecommitdiff
path: root/nptl/tst-cond20.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/tst-cond20.c')
-rw-r--r--nptl/tst-cond20.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nptl/tst-cond20.c b/nptl/tst-cond20.c
index 918c4ad..665a66a 100644
--- a/nptl/tst-cond20.c
+++ b/nptl/tst-cond20.c
@@ -96,7 +96,10 @@ do_test (void)
for (i = 0; i < ROUNDS; ++i)
{
- pthread_cond_wait (&cond2, &mut);
+ /* Make sure we discard spurious wake-ups. */
+ do
+ pthread_cond_wait (&cond2, &mut);
+ while (count != N);
if (i & 1)
pthread_mutex_unlock (&mut);