зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
85cca7c808
Коммит
3c92c902ef
|
@ -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);
|
||||
DosResetEventSem(thred->md.blocked_sema.sem, &count);
|
||||
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);
|
||||
DosResetEventSem(thred->md.blocked_sema.sem, &count);
|
||||
if (rv == NO_ERROR) {
|
||||
DosResetEventSem(thred->md.blocked_sema.sem, &count);
|
||||
}
|
||||
PR_ASSERT(rv == NO_ERROR);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче