1 <h2>lock_set_create
</h2>
4 <strong>Function
</strong> - Create a new lock set.
7 <strong>kern_return_t lock_set_create
</strong>
8 <strong>(task_t
</strong> <var>task
</var>,
9 <strong>lock_set_t
</strong> <var>lock_set
</var>,
10 <strong>int
</strong> <var>locks
</var>,
11 <strong>int
</strong> <var>policy
</var><strong>);
</strong>
18 The task receiving the send right to the newly created lock set.
20 <dt> <var>lock_set
</var>
22 [out send right] The port naming the lock set which represents the lock.
26 [in scalar] The number of locks the lock set will represent (must be a positive value).
28 <dt> <var>policy
</var>
30 [in scalar] The blocked thread wakeup policy for the newly created lock set. Valid policies are:
35 a first-in-first-out policy for scheduling thread wakeup.
37 <dt> SYNC_POLICY_FIXED_PRIORITY
39 a fixed priority policy for scheduling thread wakeup.
44 The
<strong>lock_set_create
</strong> function creates a new lock set representing a
45 collection of associated locks. The lock set is associated with the
46 specified task. A send right naming the lock set is returned to the
48 <h3>RETURN VALUES
</h3>
51 <dt> <strong>KERN_SUCCESS
</strong>
53 The lock set was created.
55 <dt> <strong>KERN_INVALID_ARGUMENT
</strong>
57 Either the task or policy argument is invalid, or the locks argument
58 has a value that is less than or equal to zero.
60 <dt> <strong>KERN_RESOURCE_SHORTAGE
</strong>
62 The kernel could not allocate the lock set.
64 <h3>RELATED INFORMATION
</h3>
67 <a href=
"lock_acquire.html"><strong>lock_acquire
</strong></a>,
68 <a href=
"lock_make_stable.html"><strong>lock_make_stable
</strong></a>,
69 <a href=
"lock_try.html"><strong>lock_try
</strong></a>,
70 <a href=
"lock_handoff.html"><strong>lock_handoff
</strong></a>,
71 <a href=
"lock_handoff_accept.html"><strong>lock_handoff_accept
</strong></a>,
72 <a href=
"lock_try.html"><strong>lock_try
</strong></a>,
73 <a href=
"lock_set_destroy.html"><strong>lock_set_destroy
</strong></a>.