]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/lock_set_create.html
xnu-792.6.70.tar.gz
[apple/xnu.git] / osfmk / man / lock_set_create.html
CommitLineData
9bccf70c 1<h2>lock_set_create</h2>\r<hr>\r<p>\r<strong>Function</strong> - Create a new lock set.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t lock_set_create</strong>\r <strong>(task_t</strong> <var>task</var>,\r <strong>lock_set_t</strong> <var>lock_set</var>,\r <strong>int</strong> <var>locks</var>,\r <strong>int</strong> <var>policy</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>task</var>\r<dd>\rThe task receiving the send right to the newly created lock set.\r<p>\r<dt> <var>lock_set</var>\r<dd>\r[out send right] The port naming the lock set which represents the lock.\r<p>\r<dt> <var>locks</var>\r<dd>\r[in scalar] The number of locks the lock set will represent (must be a positive value).\r<p>\r<dt> <var>policy</var>\r<dd>\r[in scalar] The blocked thread wakeup policy for the newly created lock set. Valid policies are:\r <dl>\r<p>\r<dt> SYNC_POLICY_FIFO\r<dd>\ra first-in-first-out policy for scheduling thread wakeup.\r<p>\r<dt> SYNC_POLICY_FIXED_PRIORITY\r<dd>\ra fixed priority policy for scheduling thread wakeup.\r</dl>\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>lock_set_create</strong> function creates a new lock set representing a\rcollection of associated locks. The lock set is associated with the\rspecified task. A send right naming the lock set is returned to the\rcaller.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>KERN_SUCCESS</strong>\r<dd>\rThe lock set was created.\r<p>\r<dt> <strong>KERN_INVALID_ARGUMENT</strong>\r<dd>\rEither the task or policy argument is invalid, or the locks argument\rhas a value that is less than or equal to zero.\r<p>\r<dt> <strong>KERN_RESOURCE_SHORTAGE</strong>\r<dd>\rThe kernel could not allocate the lock set.\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_make_stable.html"><strong>lock_make_stable</strong></a>,\r<a href="lock_try.html"><strong>lock_try</strong></a>,\r<a href="lock_handoff.html"><strong>lock_handoff</strong></a>,\r<a href="lock_handoff_accept.html"><strong>lock_handoff_accept</strong></a>,\r<a href="lock_try.html"><strong>lock_try</strong></a>,\r<a href="lock_set_destroy.html"><strong>lock_set_destroy</strong></a>.\r