Bugzilla bug 105154: fixed a timing problem in OS/2's implementation of

condition variables.  Thanks to Aaron Read <aaronr@us.ibm.com> for the
patch.  r=wtc.
This commit is contained in:
wtc%netscape.com 2001-10-16 23:54:24 +00:00
Родитель 85cca7c808
Коммит 3c92c902ef
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -275,7 +275,9 @@ _PR_MD_WAIT_CV(_MDCVar *cv, _MDLock *lock, PRIntervalTime timeout )
/* Wait for notification or timeout; don't really care which */
rv = DosWaitEventSem(thred->md.blocked_sema.sem, msecs);
if (rv == NO_ERROR) {
DosResetEventSem(thred->md.blocked_sema.sem, &count);
}
DosRequestMutexSem((lock->mutex), SEM_INDEFINITE_WAIT);
@ -314,7 +316,9 @@ _PR_MD_WAIT_CV(_MDCVar *cv, _MDLock *lock, PRIntervalTime timeout )
* non-signaled. We assume this wait won't take long.
*/
rv = DosWaitEventSem(thred->md.blocked_sema.sem, SEM_INDEFINITE_WAIT);
if (rv == NO_ERROR) {
DosResetEventSem(thred->md.blocked_sema.sem, &count);
}
PR_ASSERT(rv == NO_ERROR);
}
}