Lines Matching defs:task
44 #include <mach/task.h>
159 task_t task,
169 if (task == TASK_NULL || value < 0 || policy > SYNC_POLICY_MAX)
187 * task (if not the kernel itself).
189 s->ref_count = (task == kernel_task) ? 2 : 3;
203 * Associate the new semaphore with the task by adding
204 * the new semaphore to the task's semaphore list.
206 * Associate the task with the new semaphore by having the
207 * semaphores task pointer point to the owning task's structure.
209 task_lock(task);
210 enqueue_head(&task->semaphore_list, (queue_entry_t) s);
211 task->semaphores_owned++;
212 s->owner = task;
214 task_unlock(task);
225 * specified task is the SAME task name specified at the semaphore's
233 task_t task,
240 if (task == TASK_NULL || semaphore == SEMAPHORE_NULL)
246 task_lock(task);
247 if (semaphore->owner != task) {
248 task_unlock(task);
253 task->semaphores_owned--;
254 task_unlock(task);
284 * Drop the task's semaphore reference, which in turn deallocates