Function - Wait on the specified semaphore.
kern_return_t semaphore_wait
(semaphore_t semaphore);
The semaphore_wait function decrements the semaphore count. If the semaphore count is negative after decrementing, the calling thread blocks. Device driver interrupt service routines (ISR) should never execute semaphore_wait, since waiting on a semaphore at the ISR level may, and often will, lead to a deadlock.
Functions: semaphore_create, semaphore_destroy, semaphore_signal, semaphore_signal_all, device_get_status.