osfmk/man/semaphore_signal.html
Function - Increments the semaphore count.
**kern\_return\_t semaphore\_signal**** (semaphore\_t **semaphore** );**
semaphore[in send right] The port naming the semaphore to be signalled.
The semaphore_signal function increments the semaphore count. If the count goes non-negative (i.e. greater than or equal to 0) and a thread is blocked on the semaphore, then the waiting thread is scheduled to execute. If multiple threads are blocked on the semaphore, the thread scheduled to execute is selected according to the wakeup policy of the semaphore (set when the semaphore was created via semaphore_create ). Device driver interrupt service routines may safely execute semaphore_signal operations without causing a deadlock.
KERN_INVALID_ARGUMENT The specified semaphore is invalid.
KERN_TERMINATED The specified semaphore has been destroyed.
KERN_SUCCESS The semaphore has been signalled.
Functions: semaphore_create, semaphore_destroy, semaphore_signal_all, semaphore_wait, device_get_status.