]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/lock_release.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / lock_release.html
CommitLineData
13fec989
A
1<h2>lock_release</h2>
2<hr>
3<p>
4<strong>Function</strong> - Release ownership of a lock.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t lock_release</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
17lock.
18<p>
19<dt> <var>lock_id</var>
20<dd>
21[in scalar] The lock, represented by the lock set, to be released.
22</dl>
23<h3>DESCRIPTION</h3>
24<p>
25The <strong>lock_release</strong> function release the ownership of the specified lock.
26If the calling thread does not own the lock then the call will fail.
27<h3>RETURN VALUES</h3>
28<dl>
29<p>
30<dt> <strong>KERN_INVALID_ARGUMENT</strong>
31<dd>
32The specified lock_set is invalid, or the lock_id is out of range.
33 <p>
34 <dt> <strong>KERN_INVALID_RIGHT</strong>
35 <dd>
36 The specified task does not own the specified lock.
37<p>
38<dt> <strong>KERN_SUCCESS</strong>
39<dd>
40The ownership of the lock was released.
41<p>
42<dt> <strong>KERN_LOCK_SET_DESTROYED</strong>
43<dd>
44The specified lock has been destroyed.
45</dl>
46<h3>RELATED INFORMATION</h3>
47<p>
48Functions:
49<a href="lock_acquire.html"><strong>lock_acquire</strong></a>,
50<a href="lock_make_stable.html"><strong>lock_make_stable</strong></a>,
51<a href="lock_try.html"><strong>lock_try</strong></a>,
52<a href="lock_handoff.html"><strong>lock_handoff</strong></a>,
53<a href="lock_handoff_accept.html"><strong>lock_handoff_accept</strong></a>,
54<a href="lock_set_create.html"><strong>lock_set_create</strong></a>,
55<a href="lock_set_destroy.html"><strong>lock_set_destroy</strong></a>.