mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-12 16:30:44 +00:00
POSIX conforming use of pthread_cond_wait().
This commit is contained in:
parent
e355c83f59
commit
e867749999
@ -328,7 +328,9 @@ static int idle_sem_ok = -1;
|
|||||||
void idle_wait(void)
|
void idle_wait(void)
|
||||||
{
|
{
|
||||||
#ifdef IDLE_USES_COND_WAIT
|
#ifdef IDLE_USES_COND_WAIT
|
||||||
|
pthread_mutex_lock(&idle_lock);
|
||||||
pthread_cond_wait(&idle_cond, &idle_lock);
|
pthread_cond_wait(&idle_cond, &idle_lock);
|
||||||
|
pthread_mutex_unlock(&idle_lock);
|
||||||
#else
|
#else
|
||||||
#ifdef IDLE_USES_SEMAPHORE
|
#ifdef IDLE_USES_SEMAPHORE
|
||||||
if (idle_sem_ok < 0)
|
if (idle_sem_ok < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user