]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/semaphore_signal.html
xnu-7195.60.75.tar.gz
[apple/xnu.git] / osfmk / man / semaphore_signal.html
CommitLineData
13fec989
A
1<h2>semaphore_signal</h2>
2<hr>
3<p>
4<strong>Function</strong> - Increments the semaphore count.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t semaphore_signal</strong>
8 <strong>(semaphore_t</strong> <var>semaphore</var><strong>);</strong>
9</pre>
10<h3>PARAMETERS</h3>
11<dl>
12<p>
13<dt> <var>semaphore</var>
14<dd>
15[in send right] The port naming the semaphore to be signalled.
16</dl>
17<h3>DESCRIPTION</h3>
18<p>
19The <strong>semaphore_signal</strong> function increments the semaphore count. If the
20count goes non-negative (i.e. greater than or equal to 0) and a thread
21is blocked on the semaphore, then the waiting thread is scheduled to
22execute. If multiple threads are blocked on the semaphore, the thread
23scheduled to execute is selected according to the wakeup policy of the
24semaphore (set when the semaphore was created via <strong>semaphore_create</strong>).
25Device driver interrupt service routines may safely execute
26<strong>semaphore_signal</strong> operations without causing a deadlock.
27<h3>RETURN VALUES</h3>
28<dl>
29<p>
30<dt> <strong>KERN_INVALID_ARGUMENT</strong>
31<dd>
32The specified semaphore is invalid.
33<p>
34<dt> <strong>KERN_TERMINATED</strong>
35<dd>
36The specified semaphore has been destroyed.
37<p>
38<dt> <strong>KERN_SUCCESS</strong>
39<dd>
40The semaphore has been signalled.
41</dl>
42<h3>RELATED INFORMATION</h3>
43<p>
44Functions:
45<a href="semaphore_create.html"><strong>semaphore_create</strong></a>,
46<a href="semaphore_destroy.html"><strong>semaphore_destroy</strong></a>,
47<a href="semaphore_signal_all.html"><strong>semaphore_signal_all</strong></a>,
48<a href="semaphore_wait.html"><strong>semaphore_wait</strong></a>,
49<a href="device_get_status.html"><strong>device_get_status</strong></a>.