1*d8b80295SApple OSS Distributions<h2>lock_release</h2> 2*d8b80295SApple OSS Distributions<hr> 3*d8b80295SApple OSS Distributions<p> 4*d8b80295SApple OSS Distributions<strong>Function</strong> - Release ownership of a lock. 5*d8b80295SApple OSS Distributions<h3>SYNOPSIS</h3> 6*d8b80295SApple OSS Distributions<pre> 7*d8b80295SApple OSS Distributions<strong>kern_return_t lock_release</strong> 8*d8b80295SApple OSS Distributions <strong>(lock_set_t</strong> <var>lock_set</var>, 9*d8b80295SApple OSS Distributions <strong>int</strong> <var>lock_id</var><strong>);</strong> 10*d8b80295SApple OSS Distributions</pre> 11*d8b80295SApple OSS Distributions<h3>PARAMETERS</h3> 12*d8b80295SApple OSS Distributions<dl> 13*d8b80295SApple OSS Distributions<p> 14*d8b80295SApple OSS Distributions<dt> <var>lock_set</var> 15*d8b80295SApple OSS Distributions<dd> 16*d8b80295SApple OSS Distributions[in send right] The port naming the lock set which represents the 17*d8b80295SApple OSS Distributionslock. 18*d8b80295SApple OSS Distributions<p> 19*d8b80295SApple OSS Distributions<dt> <var>lock_id</var> 20*d8b80295SApple OSS Distributions<dd> 21*d8b80295SApple OSS Distributions[in scalar] The lock, represented by the lock set, to be released. 22*d8b80295SApple OSS Distributions</dl> 23*d8b80295SApple OSS Distributions<h3>DESCRIPTION</h3> 24*d8b80295SApple OSS Distributions<p> 25*d8b80295SApple OSS DistributionsThe <strong>lock_release</strong> function release the ownership of the specified lock. 26*d8b80295SApple OSS DistributionsIf the calling thread does not own the lock then the call will fail. 27*d8b80295SApple OSS Distributions<h3>RETURN VALUES</h3> 28*d8b80295SApple OSS Distributions<dl> 29*d8b80295SApple OSS Distributions<p> 30*d8b80295SApple OSS Distributions<dt> <strong>KERN_INVALID_ARGUMENT</strong> 31*d8b80295SApple OSS Distributions<dd> 32*d8b80295SApple OSS DistributionsThe specified lock_set is invalid, or the lock_id is out of range. 33*d8b80295SApple OSS Distributions <p> 34*d8b80295SApple OSS Distributions <dt> <strong>KERN_INVALID_RIGHT</strong> 35*d8b80295SApple OSS Distributions <dd> 36*d8b80295SApple OSS Distributions The specified task does not own the specified lock. 37*d8b80295SApple OSS Distributions<p> 38*d8b80295SApple OSS Distributions<dt> <strong>KERN_SUCCESS</strong> 39*d8b80295SApple OSS Distributions<dd> 40*d8b80295SApple OSS DistributionsThe ownership of the lock was released. 41*d8b80295SApple OSS Distributions<p> 42*d8b80295SApple OSS Distributions<dt> <strong>KERN_LOCK_SET_DESTROYED</strong> 43*d8b80295SApple OSS Distributions<dd> 44*d8b80295SApple OSS DistributionsThe specified lock has been destroyed. 45*d8b80295SApple OSS Distributions</dl> 46*d8b80295SApple OSS Distributions<h3>RELATED INFORMATION</h3> 47*d8b80295SApple OSS Distributions<p> 48*d8b80295SApple OSS DistributionsFunctions: 49*d8b80295SApple OSS Distributions<a href="lock_acquire.html"><strong>lock_acquire</strong></a>, 50*d8b80295SApple OSS Distributions<a href="lock_make_stable.html"><strong>lock_make_stable</strong></a>, 51*d8b80295SApple OSS Distributions<a href="lock_try.html"><strong>lock_try</strong></a>, 52*d8b80295SApple OSS Distributions<a href="lock_handoff.html"><strong>lock_handoff</strong></a>, 53*d8b80295SApple OSS Distributions<a href="lock_handoff_accept.html"><strong>lock_handoff_accept</strong></a>, 54*d8b80295SApple OSS Distributions<a href="lock_set_create.html"><strong>lock_set_create</strong></a>, 55*d8b80295SApple OSS Distributions<a href="lock_set_destroy.html"><strong>lock_set_destroy</strong></a>. 56