1 <h2>semaphore_destroy
</h2>
4 <strong>Function
</strong> - Destroy a semaphore.
7 <strong>kern_return_t semaphore_destroy
</strong>
8 <strong>(task_t
</strong> <var>task
</var>,
9 <strong>semaphore_t
</strong> <var>semaphore
</var><strong>);
</strong>
16 [in task port] The task associated with the target semaphore.
18 <dt> <var>semaphore
</var>
20 [in send right] The port naming the semaphore to be destroyed.
24 The
<strong>semaphore_destroy
</strong> function destroys a semaphore.
26 naming the semaphore become dead names. Threads waiting on the
27 semaphore become unblocked with the return from the
28 <strong>semaphore_wait
</strong>
29 call indicating that the semaphore was destroyed. A call to
30 <strong>semaphore_destroy
</strong> succeeds only if the semaphore is associated
31 with the specified task.
32 <h3>RETURN VALUES
</h3>
35 <dt> <strong>KERN_INVALID_ARGUMENT
</strong>
37 Either, or both, the task or semaphore arguments were invalid.
39 <dt> <strong>KERN_INVALID_RIGHT
</strong>
41 The specified task does not own the specified semaphore.
43 <dt> <strong>KERN_TERMINATED
</strong>
45 The specified semaphore was previously destroyed.
47 <dt> <strong>KERN_SUCCESS
</strong>
49 The semaphore was destroyed.
51 <h3>RELATED INFORMATION
</h3>
54 <a href=
"semaphore_create.html"><strong>semaphore_create
</strong></a>,
55 <a href=
"semaphore_signal.html"><strong>semaphore_signal
</strong></a>,
56 <a href=
"semaphore_signal_all.html"><strong>semaphore_signal_all
</strong></a>,
57 <a href=
"semaphore_wait.html"><strong>semaphore_wait
</strong></a>,
58 <a href=
"device_get_status.html"><strong>device_get_status
</strong></a>.