]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/lock_handoff_accept.html
xnu-792.24.17.tar.gz
[apple/xnu.git] / osfmk / man / lock_handoff_accept.html
1 <h2>lock_handoff_accept</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Accept a lock hand-off.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t lock_handoff_accept</strong>
8 <strong>(lock_set_t</strong> <var>lock_set</var>,
9 <strong>int</strong> <var>lock_id</var><strong>);</strong>
10 </pre>
11 <h3>PARAMETERS</h3>
12 <dl>
13 <p>
14 <dt> <var>lock_set</var>
15 <dd>
16 [in send right] The port naming the lock set which represents the
17 lock.
18 <p>
19 <dt> <var>lock_id</var>
20 <dd>
21 [in scalar] The lock, represented by the lock set, that is the object
22 of the handoff operation.
23 </dl>
24 <h3>DESCRIPTION</h3>
25 <p>
26 The <strong>lock_handoff_accept</strong> function accepts a lock
27 hand-off from an anonymous sending thread. If the sending thread is
28 not waiting to hand-off the lock, the calling thread will block until
29 the lock handoff is completed. Only one thread may be waiting to
30 accept a lock handoff at any given time.
31 <h3>RETURN VALUES</h3>
32 <dl>
33 <p>
34 <dt> <strong>KERN_ALREADY_WAITING</strong>
35 <dd>
36 Another thread is already waiting for a hand-off of this lock.
37 <p>
38 <dt> <strong>KERN_INVALID_ARGUMENT</strong>
39 <dd>
40 The specified lock_set is invalid, or the lock_id is out of range.
41 <p>
42 <dt> <strong>KERN_SUCCESS</strong>
43 <dd>
44 The lock hand-off was successful.
45 <p>
46 <dt> <strong>KERN_LOCK_UNSTABLE</strong>
47 <dd>
48 The acquired lock has an unstable state.
49 <p>
50 <dt> <strong>KERN_LOCK_SET_DESTROYED</strong>
51 <dd>
52 The specified lock has been destroyed.
53 <p>
54 <dt> <strong>KERN_ABORTED</strong>
55 <dd>
56 While blocked to wait for the sending thread to transfer the lock's ownership,
57 the calling thread was awoken by an unrelated event;
58 the lock's handoff state is cleared.
59 </dl>
60 <h3>RELATED INFORMATION</h3>
61 <p>
62 Functions:
63 <a href="lock_acquire.html"><strong>lock_acquire</strong></a>,
64 <a href="lock_release.html"><strong>lock_release</strong></a>,
65 <a href="lock_try.html"><strong>lock_try</strong></a>,
66 <a href="lock_handoff.html"><strong>lock_handoff</strong></a>.