]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/semaphore_signal.html
xnu-792.6.70.tar.gz
[apple/xnu.git] / osfmk / man / semaphore_signal.html
CommitLineData
9bccf70c 1<h2>semaphore_signal</h2>\r<hr>\r<p>\r<strong>Function</strong> - Increments the semaphore count.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t semaphore_signal</strong>\r <strong>(semaphore_t</strong> <var>semaphore</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>semaphore</var>\r<dd>\r[in send right] The port naming the semaphore to be signalled.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>semaphore_signal</strong> function increments the semaphore count. If the\rcount goes non-negative (i.e. greater than or equal to 0) and a thread\ris blocked on the semaphore, then the waiting thread is scheduled to\rexecute. If multiple threads are blocked on the semaphore, the thread\rscheduled to execute is selected according to the wakeup policy of the\rsemaphore (set when the semaphore was created via <strong>semaphore_create</strong>).\rDevice driver interrupt service routines may safely execute\r<strong>semaphore_signal</strong> operations without causing a deadlock.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>KERN_INVALID_ARGUMENT</strong>\r<dd>\rThe specified semaphore is invalid.\r<p>\r<dt> <strong>KERN_TERMINATED</strong>\r<dd>\rThe specified semaphore has been destroyed.\r<p>\r<dt> <strong>KERN_SUCCESS</strong>\r<dd>\rThe semaphore has been signalled.\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_destroy.html"><strong>semaphore_destroy</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