Function - Destroy a semaphore.
kern_return_t semaphore_destroy (task_t task, semaphore_t semaphore);
The semaphore_destroy function destroys a semaphore. All send rights naming the semaphore become dead names. Threads waiting on the semaphore become unblocked with the return from the semaphore_wait call indicating that the semaphore was destroyed. A call to semaphore_destroy succeeds only if the semaphore is associated with the specified task.
Functions: semaphore_create, semaphore_signal, semaphore_signal_all, semaphore_wait, device_get_status.