]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/man/lock_handoff.html
xnu-792.6.76.tar.gz
[apple/xnu.git] / osfmk / man / lock_handoff.html
index 9c6e84b87f40cadf5542eb1e4e78f2248a30c8de..aed2ed9adc72e66f8dbd59d75cd73954bbcbbb1b 100755 (executable)
@@ -1 +1,63 @@
-<h2>lock_handoff</h2>\r<hr>\r<p>\r<strong>Function</strong> - Hand-off ownership of a lock.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t   lock_handoff</strong>\r                <strong>(lock_set_t</strong>                            <var>lock_set</var>,\r                 <strong>int</strong>                                    <var>lock_id</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>lock_set</var>\r<dd>\r[in send right] The port naming the lock set which represents the\rlock.\r<p>\r<dt> <var>lock_id</var>\r<dd>\r[in scalar] The lock, represented by the lock set, to be handed off.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>lock_handoff</strong> function passes lock ownership from the calling\rthread to an anonymous accepting thread. The lock must be owned by the\rcalling thread. If the accepting thread is not waiting to receive the\rlock, the calling thread will block until the hand-off is accepted.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>KERN_INVALID_ARGUMENT</strong>\r<dd>\rThe specified lock_set is invalid, or the lock_id is out of range.\r<p>\r<dt> <strong>KERN_INVALID_RIGHT</strong>\r<dd>\rThe calling thread does not own the lock being handed off.\r<p>\r<dt> <strong>KERN_SUCCESS</strong>\r<dd>\rThe lock hand-off was successful.\r<p>\r<dt> <strong>KERN_LOCK_SET_DESTROYED</strong>\r<dd>\rThe specified lock has been destroyed.\r<p>\r<dt> <strong>KERN_ABORTED</strong>\r<dd>\rWhile blocked to wait for the accepting thread to assume the lock's ownership,\r     the calling thread was awoken by an unrelated event;\r     the lock's handoff state is cleared.\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="lock_acquire.html"><strong>lock_acquire</strong></a>,\r<a href="lock_release.html"><strong>lock_release</strong></a>,\r<a href="lock_try.html"><strong>lock_try</strong></a>,\r<a href="lock_handoff_accept.html"><strong>lock_handoff_accept</strong></a>,\r<a href="lock_make_stable.html"><strong>lock_make_stable</strong></a>,\r<a href="lock_set_create.html"><strong>lock_set_create</strong></a>,\r<a href="lock_set_destroy.html"><strong>lock_set_destroy</strong></a>.\r
\ No newline at end of file
+<h2>lock_handoff</h2>
+<hr>
+<p>
+<strong>Function</strong> - Hand-off ownership of a lock.
+<h3>SYNOPSIS</h3>
+<pre>
+<strong>kern_return_t   lock_handoff</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 handed off.
+</dl>
+<h3>DESCRIPTION</h3>
+<p>
+The <strong>lock_handoff</strong> function passes lock ownership from the calling
+thread to an anonymous accepting thread. The lock must be owned by the
+calling thread. If the accepting thread is not waiting to receive the
+lock, the calling thread will block until the hand-off is accepted.
+<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 calling thread does not own the lock being handed off.
+<p>
+<dt> <strong>KERN_SUCCESS</strong>
+<dd>
+The lock hand-off was successful.
+<p>
+<dt> <strong>KERN_LOCK_SET_DESTROYED</strong>
+<dd>
+The specified lock has been destroyed.
+<p>
+<dt> <strong>KERN_ABORTED</strong>
+<dd>
+While blocked to wait for the accepting thread to assume the lock's ownership,
+     the calling thread was awoken by an unrelated event;
+     the lock's handoff state is cleared.
+</dl>
+<h3>RELATED INFORMATION</h3>
+<p>
+Functions:
+<a href="lock_acquire.html"><strong>lock_acquire</strong></a>,
+<a href="lock_release.html"><strong>lock_release</strong></a>,
+<a href="lock_try.html"><strong>lock_try</strong></a>,
+<a href="lock_handoff_accept.html"><strong>lock_handoff_accept</strong></a>,
+<a href="lock_make_stable.html"><strong>lock_make_stable</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>.