1 <h2>semaphore_signal
</h2>
4 <strong>Function
</strong> - Increments the semaphore count.
7 <strong>kern_return_t semaphore_signal
</strong>
8 <strong>(semaphore_t
</strong> <var>semaphore
</var><strong>);
</strong>
13 <dt> <var>semaphore
</var>
15 [in send right] The port naming the semaphore to be signalled.
19 The
<strong>semaphore_signal
</strong> function increments the semaphore count. If the
20 count goes non-negative (i.e. greater than or equal to
0) and a thread
21 is blocked on the semaphore, then the waiting thread is scheduled to
22 execute. If multiple threads are blocked on the semaphore, the thread
23 scheduled to execute is selected according to the wakeup policy of the
24 semaphore (set when the semaphore was created via
<strong>semaphore_create
</strong>).
25 Device driver interrupt service routines may safely execute
26 <strong>semaphore_signal
</strong> operations without causing a deadlock.
27 <h3>RETURN VALUES
</h3>
30 <dt> <strong>KERN_INVALID_ARGUMENT
</strong>
32 The specified semaphore is invalid.
34 <dt> <strong>KERN_TERMINATED
</strong>
36 The specified semaphore has been destroyed.
38 <dt> <strong>KERN_SUCCESS
</strong>
40 The semaphore has been signalled.
42 <h3>RELATED INFORMATION
</h3>
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>.