mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00
Workaround fix for a stall on launch on dual CPU OS X machines, that is caused by a race condition entering the critical section. Bug 99561. r=wtc, a=dbaron
This commit is contained in:
parent
9ed1b280ec
commit
9e35df82af
@ -222,10 +222,21 @@ void _MD_StopInterrupts(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define MAX_PAUSE_TIMEOUT_MS 500
|
||||
|
||||
void _MD_PauseCPU(PRIntervalTime timeout)
|
||||
{
|
||||
if (timeout != PR_INTERVAL_NO_WAIT)
|
||||
{
|
||||
// There is a race condition entering the critical section
|
||||
// in AsyncIOCompletion (and probably elsewhere) that can
|
||||
// causes deadlock for the duration of this timeout. To
|
||||
// work around this, use a max 500ms timeout for now.
|
||||
// See bug 99561 for details.
|
||||
if (PR_IntervalToMilliseconds(timeout) > MAX_PAUSE_TIMEOUT_MS)
|
||||
timeout = PR_MillisecondsToInterval(MAX_PAUSE_TIMEOUT_MS);
|
||||
|
||||
WaitOnIdleSemaphore(timeout);
|
||||
(void) _MD_IOInterrupt();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user