X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0b4e3aa066abc0728aacb4bbeb86f53f9737156e..90556fb8d47e7b68fd301dde9dbb3ae7495cf323:/osfmk/kern/sync_sema.c diff --git a/osfmk/kern/sync_sema.c b/osfmk/kern/sync_sema.c index d7bc25187..34618b4b5 100644 --- a/osfmk/kern/sync_sema.c +++ b/osfmk/kern/sync_sema.c @@ -50,8 +50,8 @@ #include #include -unsigned int semaphore_event; -#define SEMAPHORE_EVENT ((event_t)&semaphore_event) +static unsigned int semaphore_event; +#define SEMAPHORE_EVENT ((event64_t)&semaphore_event) zone_t semaphore_zone; unsigned int semaphore_max = SEMAPHORE_MAX; @@ -188,7 +188,7 @@ semaphore_destroy( semaphore->count = 0; if (old_count < 0) { - wait_queue_wakeup_all_locked(&semaphore->wait_queue, + wait_queue_wakeup64_all_locked(&semaphore->wait_queue, SEMAPHORE_EVENT, THREAD_RESTART, TRUE); /* unlock? */ @@ -235,7 +235,7 @@ semaphore_signal_internal( if (thread_act != THR_ACT_NULL) { if (semaphore->count < 0) { - kr = wait_queue_wakeup_thread_locked( + kr = wait_queue_wakeup64_thread_locked( &semaphore->wait_queue, SEMAPHORE_EVENT, thread_act->thread, @@ -254,7 +254,7 @@ semaphore_signal_internal( if (old_count < 0) { semaphore->count = 0; /* always reset */ - kr = wait_queue_wakeup_all_locked( + kr = wait_queue_wakeup64_all_locked( &semaphore->wait_queue, SEMAPHORE_EVENT, THREAD_AWAKENED, @@ -270,7 +270,7 @@ semaphore_signal_internal( } if (semaphore->count < 0) { - if (wait_queue_wakeup_one_locked( + if (wait_queue_wakeup64_one_locked( &semaphore->wait_queue, SEMAPHORE_EVENT, THREAD_AWAKENED, @@ -582,10 +582,11 @@ semaphore_wait_internal( kr = KERN_OPERATION_TIMED_OUT; } else { wait_semaphore->count = -1; /* we don't keep an actual count */ - (void)wait_queue_assert_wait_locked(&wait_semaphore->wait_queue, - SEMAPHORE_EVENT, - THREAD_ABORTSAFE, - FALSE); /* unlock? */ + (void)wait_queue_assert_wait64_locked( + &wait_semaphore->wait_queue, + SEMAPHORE_EVENT, + THREAD_ABORTSAFE, + FALSE); /* unlock? */ } semaphore_unlock(wait_semaphore); splx(spl_level); @@ -671,7 +672,7 @@ semaphore_wait_internal( self->sth_signalsemaphore = signal_semaphore; wait_result = thread_block(continuation); } else { - wait_result = thread_block((void (*)(void))0); + wait_result = thread_block(THREAD_CONTINUE_NULL); } /*