From 56dc73ef7a123642542752a9177abd2133448b08 Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Wed, 9 Apr 2003 22:40:33 +0000 Subject: [PATCH] Bug 201405: we must call PR_WaitCondCVar in a while loop. git-svn-id: svn://10.0.0.236/trunk@140944 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/nsprpub/pr/tests/cvar2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/nsprpub/pr/tests/cvar2.c b/mozilla/nsprpub/pr/tests/cvar2.c index 33e3510d32f..ce2fd9271d6 100644 --- a/mozilla/nsprpub/pr/tests/cvar2.c +++ b/mozilla/nsprpub/pr/tests/cvar2.c @@ -102,7 +102,7 @@ SharedCondVarThread(void *_info) for (index=0; indexloops; index++) { PR_Lock(info->lock); - if (*info->tcount == 0) + while (*info->tcount == 0) PR_WaitCondVar(info->cvar, info->timeout); #if 0 printf("shared thread %ld notified in loop %ld\n", info->id, index); @@ -129,7 +129,7 @@ PrivateCondVarThread(void *_info) for (index=0; indexloops; index++) { PR_Lock(info->lock); - if (*info->tcount == 0) { + while (*info->tcount == 0) { DPRINTF(("PrivateCondVarThread: thread 0x%lx waiting on cvar = 0x%lx\n", PR_GetCurrentThread(), info->cvar)); PR_WaitCondVar(info->cvar, info->timeout);