]>
Commit | Line | Data |
---|---|---|
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> | |
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> | |
28 | <dl> | |
29 | <p> | |
30 | <dt> <strong>KERN_INVALID_ARGUMENT</strong> | |
31 | <dd> | |
32 | The specified semaphore is invalid. | |
33 | <p> | |
34 | <dt> <strong>KERN_TERMINATED</strong> | |
35 | <dd> | |
36 | The specified semaphore has been destroyed. | |
37 | <p> | |
38 | <dt> <strong>KERN_SUCCESS</strong> | |
39 | <dd> | |
40 | The semaphore has been signalled. | |
41 | </dl> | |
42 | <h3>RELATED INFORMATION</h3> | |
43 | <p> | |
44 | Functions: | |
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>. |