#6211 Abort if the carbon loop doesn't become ready within timeout
This commit is contained in:
parent
eb8416b27f
commit
607201d586
|
@ -47,6 +47,7 @@
|
||||||
#include <IOKit/hidsystem/event_status_driver.h>
|
#include <IOKit/hidsystem/event_status_driver.h>
|
||||||
#include <AppKit/NSEvent.h>
|
#include <AppKit/NSEvent.h>
|
||||||
#include <IOKit/hidsystem/IOHIDLib.h>
|
#include <IOKit/hidsystem/IOHIDLib.h>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
// This isn't in any Apple SDK that I know of as of yet.
|
// This isn't in any Apple SDK that I know of as of yet.
|
||||||
enum {
|
enum {
|
||||||
|
@ -2061,8 +2062,8 @@ OSXScreen::waitForCarbonLoop() const
|
||||||
double timeout = ARCH->time() + kCarbonLoopWaitTimeout;
|
double timeout = ARCH->time() + kCarbonLoopWaitTimeout;
|
||||||
while (!m_carbonLoopReady->wait()) {
|
while (!m_carbonLoopReady->wait()) {
|
||||||
if (ARCH->time() > timeout) {
|
if (ARCH->time() > timeout) {
|
||||||
LOG((CLOG_DEBUG "carbon loop not ready, waiting again"));
|
LOG((CLOG_DEBUG "carbon loop not ready, aborting"));
|
||||||
timeout = ARCH->time() + kCarbonLoopWaitTimeout;
|
::abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue