1 <h2>lock_handoff_accept
</h2>
4 <strong>Function
</strong> - Accept a lock hand-off.
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>
14 <dt> <var>lock_set
</var>
16 [in send right] The port naming the lock set which represents the
19 <dt> <var>lock_id
</var>
21 [in scalar] The lock, represented by the lock set, that is the object
22 of the handoff operation.
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>
34 <dt> <strong>KERN_ALREADY_WAITING
</strong>
36 Another thread is already waiting for a hand-off of this lock.
38 <dt> <strong>KERN_INVALID_ARGUMENT
</strong>
40 The specified lock_set is invalid, or the lock_id is out of range.
42 <dt> <strong>KERN_SUCCESS
</strong>
44 The lock hand-off was successful.
46 <dt> <strong>KERN_LOCK_UNSTABLE
</strong>
48 The acquired lock has an unstable state.
50 <dt> <strong>KERN_LOCK_SET_DESTROYED
</strong>
52 The specified lock has been destroyed.
54 <dt> <strong>KERN_ABORTED
</strong>
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.
60 <h3>RELATED INFORMATION
</h3>
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>.