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
This commit is contained in:
wtc%netscape.com
2003-04-09 22:40:33 +00:00
parent 34b51a03b1
commit 56dc73ef7a

View File

@@ -102,7 +102,7 @@ SharedCondVarThread(void *_info)
for (index=0; index<info->loops; 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; index<info->loops; 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);