]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/semaphore_destroy.html
xnu-792.6.70.tar.gz
[apple/xnu.git] / osfmk / man / semaphore_destroy.html
CommitLineData
9bccf70c 1<h2>semaphore_destroy</h2>\r<hr>\r<p>\r<strong>Function</strong> - Destroy a semaphore.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t semaphore_destroy</strong>\r <strong>(task_t</strong> <var>task</var>,\r <strong>semaphore_t</strong> <var>semaphore</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>task</var>\r<dd>\r[in task port] The task associated with the target semaphore.\r<p>\r<dt> <var>semaphore</var>\r<dd>\r[in send right] The port naming the semaphore to be destroyed.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>semaphore_destroy</strong> function destroys a semaphore.\rAll send rights\rnaming the semaphore become dead names. Threads waiting on the\rsemaphore become unblocked with the return from the\r<strong>semaphore_wait</strong>\rcall indicating that the semaphore was destroyed. A call to\r<strong>semaphore_destroy</strong> succeeds only if the semaphore is associated\rwith the specified task.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>KERN_INVALID_ARGUMENT</strong>\r<dd>\rEither, or both, the task or semaphore arguments were invalid.\r<p>\r<dt> <strong>KERN_INVALID_RIGHT</strong>\r<dd>\rThe specified task does not own the specified semaphore.\r<p>\r<dt> <strong>KERN_TERMINATED</strong>\r<dd>\rThe specified semaphore was previously destroyed.\r<p>\r<dt> <strong>KERN_SUCCESS</strong>\r<dd>\rThe semaphore was destroyed.\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="semaphore_create.html"><strong>semaphore_create</strong></a>,\r<a href="semaphore_signal.html"><strong>semaphore_signal</strong></a>,\r<a href="semaphore_signal_all.html"><strong>semaphore_signal_all</strong></a>,\r<a href="semaphore_wait.html"><strong>semaphore_wait</strong></a>,\r<a href="device_get_status.html"><strong>device_get_status</strong></a>.\r