• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/ntp-88/lib/isc/include/isc/

Lines Matching refs:task

18 /* $Id: task.h,v 1.61.332.2 2009/01/18 23:47:41 tbox Exp $ */
27 /*! \file isc/task.h
28 * \brief The task system provides a lightweight execution context, which is
31 * When a task's event queue is non-empty, the
32 * task is runnable. A small work crew of threads, typically one per CPU,
56 * Events which have been queued for a task but not delivered may be removed
57 * from the task's event queue by purging or unsending.
103 * Create a task.
108 * before the task must yield to other tasks waiting to execute. If
109 * quantum is zero, then the default quantum of the task manager will
118 *\li 'manager' is a valid task manager.
124 *\li On success, '*taskp' is bound to the new task.
141 *\li 'source' is a valid task.
153 * Detach *taskp from its task.
157 *\li '*taskp' is a valid task.
163 *\li If '*taskp' is the last reference to the task, the task is idle (has
164 * an empty event queue), and has not been shutdown, the task will be
167 *\li If '*taskp' is the last reference to the task and
168 * the task has been shutdown,
169 * all resources used by the task will be freed.
173 isc_task_send(isc_task_t *task, isc_event_t **eventp);
175 * Send '*event' to 'task'.
179 *\li 'task' is a valid task.
191 * task.
195 *\li '*taskp' is a valid task.
204 *\li If '*taskp' is the last reference to the task, the task is
206 * the task will be shutdown.
208 *\li If '*taskp' is the last reference to the task and
209 * the task has been shutdown,
210 * all resources used by the task will be freed.
215 isc_task_purgerange(isc_task_t *task, void *sender, isc_eventtype_t first,
218 * Purge events from a task's event queue.
222 *\li 'task' is a valid task.
228 *\li Events in the event queue of 'task' whose sender is 'sender', whose
241 isc_task_purge(isc_task_t *task, void *sender, isc_eventtype_t type,
244 * Purge events from a task's event queue.
251 * isc_task_purgerange(task, sender, type, type, tag);
256 *\li 'task' is a valid task.
260 *\li Events in the event queue of 'task' whose sender is 'sender', whose
273 isc_task_purgeevent(isc_task_t *task, isc_event_t *event);
275 * Purge 'event' from a task's event queue.
281 *\li If 'event' is on the task's event queue, it will be purged,
283 * on the task's event queue; in fact, it can even be an invalid
284 * pointer. Purging only occurs if the event is actually on the task's
287 * \li Purging never changes the state of the task.
291 *\li 'task' is a valid task.
295 *\li 'event' is not in the event queue for 'task'.
305 isc_task_unsendrange(isc_task_t *task, void *sender, isc_eventtype_t first,
308 * Remove events from a task's event queue.
312 *\li 'task' is a valid task.
320 *\li Events in the event queue of 'task' whose sender is 'sender', whose
333 isc_task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type,
336 * Remove events from a task's event queue.
343 * isc_task_unsendrange(task, sender, type, type, tag, events);
348 *\li 'task' is a valid task.
354 *\li Events in the event queue of 'task' whose sender is 'sender', whose
364 isc_task_onshutdown(isc_task_t *task, isc_taskaction_t action,
368 * 'task' is shutdown.
376 *\li 'task' is a valid task.
378 *\li 'action' is a valid task action.
382 *\li When the task is shutdown, shutdown events requested with
383 * isc_task_onshutdown() will be appended to the task's event queue.
394 isc_task_shutdown(isc_task_t *task);
396 * Shutdown 'task'.
400 *\li Shutting down a task causes any shutdown events requested with
401 * isc_task_onshutdown() to be posted (in LIFO order). The task
405 *\li Trying to shutdown a task that has already been shutdown has no
410 *\li 'task' is a valid task.
434 * '*taskp' is a valid task.
443 *\li If '*taskp' is the last reference to the task,
444 * all resources used by the task will be freed.
448 isc_task_setname(isc_task_t *task, const char *name, void *tag);
450 * Name 'task'.
456 *\li Naming a task is currently only useful for debugging purposes.
460 *\li 'task' is a valid task.
464 isc_task_getname(isc_task_t *task);
466 * Get the name of 'task', as previously set using isc_task_setname().
472 *\li 'task' is a valid task.
476 * If the task has not been named, the string is
482 isc_task_gettag(isc_task_t *task);
484 * Get the tag value for 'task', as previously set using isc_task_settag().
490 *\li 'task' is a valid task.
494 isc_task_beginexclusive(isc_task_t *task);
496 * Request exclusive access for 'task', which must be the calling
497 * task. Waits for any other concurrently executing tasks to finish their
499 * tasks sharing a task manager with 'task'.
505 *\li 'task' is the calling task.
508 *\li #ISC_R_SUCCESS The current task now has exclusive access.
509 *\li #ISC_R_LOCKBUSY Another task has already requested exclusive
514 isc_task_endexclusive(isc_task_t *task);
520 *\li 'task' is the calling task, and has obtained
525 isc_task_getcurrenttime(isc_task_t *task, isc_stdtime_t *t);
527 * Provide the most recent timestamp on the task. The timestamp is considered
531 *\li 'task' is a valid task.
546 * Create a new task manager.
570 *\li On success, '*managerp' will be attached to the newly created task
592 *\li isc_taskmgr_destroy() must not be called by a task event action,
594 * complete. An event action that wants to cause task manager shutdown
605 *\li '*managerp' is a valid task manager.
611 *\li All resources used by the task manager, and any tasks it managed,