mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-26 10:49:21 +00:00
Use locking on idle wait cond
This commit is contained in:
parent
63ddee1be1
commit
cfcfde0480
@ -386,8 +386,16 @@ void idle_wait(void)
|
|||||||
void idle_resume(void)
|
void idle_resume(void)
|
||||||
{
|
{
|
||||||
//This causes events to not process randomly in JIT so commented out
|
//This causes events to not process randomly in JIT so commented out
|
||||||
if (idle_cond)
|
if (idle_lock)
|
||||||
SDL_CondSignal(idle_cond);
|
{
|
||||||
|
SDL_LockMutex(idle_lock);
|
||||||
|
if (idle_cond)
|
||||||
|
{
|
||||||
|
SDL_CondSignal(idle_cond);
|
||||||
|
}
|
||||||
|
SDL_UnlockMutex(idle_lock);
|
||||||
|
}
|
||||||
|
|
||||||
// #ifdef IDLE_USES_COND_WAIT
|
// #ifdef IDLE_USES_COND_WAIT
|
||||||
// pthread_cond_signal(&idle_cond);
|
// pthread_cond_signal(&idle_cond);
|
||||||
// #else
|
// #else
|
||||||
|
Loading…
Reference in New Issue
Block a user