]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/lock_release.html
xnu-344.tar.gz
[apple/xnu.git] / osfmk / man / lock_release.html
1 <h2>lock_release</h2> <hr> <p> <strong>Function</strong> - Release ownership of a lock. <h3>SYNOPSIS</h3> <pre> <strong>kern_return_t lock_release</strong> <strong>(lock_set_t</strong> <var>lock_set</var>, <strong>int</strong> <var>lock_id</var><strong>);</strong> </pre> <h3>PARAMETERS</h3> <dl> <p> <dt> <var>lock_set</var> <dd> [in send right] The port naming the lock set which represents the lock. <p> <dt> <var>lock_id</var> <dd> [in scalar] The lock, represented by the lock set, to be released. </dl> <h3>DESCRIPTION</h3> <p> The <strong>lock_release</strong> function release the ownership of the specified lock. If the calling thread does not own the lock then the call will fail. <h3>RETURN VALUES</h3> <dl> <p> <dt> <strong>KERN_INVALID_ARGUMENT</strong> <dd> The specified lock_set is invalid, or the lock_id is out of range. <p> <dt> <strong>KERN_INVALID_RIGHT</strong> <dd> The specified task does not own the specified lock. <p> <dt> <strong>KERN_SUCCESS</strong> <dd> The ownership of the lock was released. <p> <dt> <strong>KERN_LOCK_SET_DESTROYED</strong> <dd> The specified lock has been destroyed. </dl> <h3>RELATED INFORMATION</h3> <p> Functions: <a href="lock_acquire.html"><strong>lock_acquire</strong></a>, <a href="lock_make_stable.html"><strong>lock_make_stable</strong></a>, <a href="lock_try.html"><strong>lock_try</strong></a>, <a href="lock_handoff.html"><strong>lock_handoff</strong></a>, <a href="lock_handoff_accept.html"><strong>lock_handoff_accept</strong></a>, <a href="lock_set_create.html"><strong>lock_set_create</strong></a>, <a href="lock_set_destroy.html"><strong>lock_set_destroy</strong></a>.