Lines Matching refs:task
21 #include <isc/task.h>
45 t1_callback(isc_task_t *task, isc_event_t *event) {
49 UNUSED(task);
56 t_info("task %s\n", (char *)event->ev_arg);
61 t1_shutdown(isc_task_t *task, isc_event_t *event) {
63 UNUSED(task);
70 my_tick(isc_task_t *task, isc_event_t *event) {
72 UNUSED(task);
224 * structure (socket, timer, task, etc) but this is just a test
383 static const char *a1 = "The task subsystem can create and manage tasks";
407 t2_shutdown(isc_task_t *task, isc_event_t *event) {
411 UNUSED(task);
444 t2_callback(isc_task_t *task, isc_event_t *event) {
459 * Create a new task and forward the message.
470 (void *)task);
483 isc_task_destroy(&task);
581 static const char *a2 = "The task subsystem can create ISC_TASKS_MIN tasks";
604 t3_sde1(isc_task_t *task, isc_event_t *event) {
606 UNUSED(task);
622 t3_sde2(isc_task_t *task, isc_event_t *event) {
624 UNUSED(task);
640 t3_event1(isc_task_t *task, isc_event_t *event) {
643 UNUSED(task);
665 t3_event2(isc_task_t *task, isc_event_t *event) {
666 UNUSED(task);
679 isc_task_t *task;
740 task = NULL;
741 isc_result = isc_task_create(tmgr, 0, &task);
752 * This event causes the task to wait on T3_cv.
759 isc_task_destroy(&task);
764 isc_task_send(task, &event);
767 * Now we fill up the task's event queue with some events.
775 isc_task_destroy(&task);
780 isc_task_send(task, &event);
786 isc_result = isc_task_onshutdown(task, t3_sde1, NULL);
791 isc_task_destroy(&task);
797 isc_result = isc_task_onshutdown(task, t3_sde2, NULL);
802 isc_task_destroy(&task);
808 isc_task_shutdown(task);
811 * Now we free the task by signaling T3_cv.
829 isc_task_detach(&task);
869 t4_event1(isc_task_t *task, isc_event_t *event) {
872 UNUSED(task);
894 t4_sde(isc_task_t *task, isc_event_t *event) {
895 UNUSED(task);
910 isc_task_t *task;
974 task = NULL;
975 isc_result = isc_task_create(tmgr, 0, &task);
993 * This event causes the task to wait on T4_cv.
1006 isc_task_destroy(&task);
1012 isc_task_send(task, &event);
1014 isc_task_shutdown(task);
1016 isc_result = isc_task_onshutdown(task, t4_sde, NULL);
1024 * Release the task.
1042 isc_task_detach(&task);
1081 t7_event1(isc_task_t *task, isc_event_t *event) {
1082 UNUSED(task);
1090 t7_sde(isc_task_t *task, isc_event_t *event) {
1093 UNUSED(task);
1127 isc_task_t *task;
1194 task = NULL;
1195 isc_result = isc_task_create(tmgr, 0, &task);
1206 isc_result = isc_task_onshutdown(task, t7_sde, NULL);
1212 isc_task_destroy(&task);
1224 isc_task_destroy(&task);
1229 isc_task_send(task, &event);
1231 isc_task_shutdown(task);
1242 isc_task_destroy(&task);
1254 isc_task_destroy(&task);
1268 isc_task_detach(&task);
1287 static const char *a7 = "A call to isc_task_create() creates a task that can "
1321 t10_event1(isc_task_t *task, isc_event_t *event) {
1324 UNUSED(task);
1353 t10_event2(isc_task_t *task, isc_event_t *event) {
1359 UNUSED(task);
1412 t10_sde(isc_task_t *task, isc_event_t *event) {
1415 UNUSED(task);
1451 isc_task_t *task;
1520 task = NULL;
1521 isc_result = isc_task_create(tmgr, 0, &task);
1533 isc_result = isc_task_onshutdown(task, t10_sde, NULL);
1537 isc_task_destroy(&task);
1547 * Block the task on T10_cv.
1554 isc_task_destroy(&task);
1562 isc_task_send(task, &event);
1565 * Fill the task's queue with some messages with varying
1581 isc_task_destroy(&task);
1606 isc_task_send(task, &eventtab[cnt]);
1615 nevents = isc_task_purge(task, purge_sender,
1628 nevents = isc_task_purgerange(task, purge_sender,
1644 isc_task_destroy(&task);
1654 * Unblock the task, allowing event processing.
1664 isc_task_shutdown(task);
1676 isc_task_detach(&task);
1689 isc_task_detach(&task);
1706 isc_task_detach(&task);
1713 t_info("task processed %d events\n", T10_eventcnt);
1775 "A call to isc_task_purge(task, sender, type, tag) "
1777 "not marked as unpurgable from sender from the task's "
1799 t11_event1(isc_task_t *task, isc_event_t *event) {
1802 UNUSED(task);
1831 t11_event2(isc_task_t *task, isc_event_t *event) {
1832 UNUSED(task);
1840 t11_sde(isc_task_t *task, isc_event_t *event) {
1843 UNUSED(task);
1876 isc_task_t *task;
1931 task = NULL;
1932 isc_result = isc_task_create(tmgr, 0, &task);
1943 isc_result = isc_task_onshutdown(task, t11_sde, NULL);
1947 isc_task_destroy(&task);
1956 * Block the task on T11_cv.
1962 isc_task_destroy(&task);
1969 isc_task_send(task, &event1);
1975 isc_task_destroy(&task);
1988 isc_task_send(task, &event2);
1990 rval = isc_task_purgeevent(task, event2_clone);
2006 * Unblock the task, allowing event processing.
2016 isc_task_shutdown(task);
2046 isc_task_detach(&task);
2070 "isc_task_purgeevent(task, event) purges the event 'event' "
2071 "from the task's queue and returns ISC_TRUE.";
2085 "isc_task_purgeevent(task, event) does not purge the "
2086 "event 'event' from the task's queue and returns "
2109 "isc_event_purgerange(task, sender, first, last, tag) "
2112 "to 'last' inclusive from the task's event queue and "
2226 t14_callback(isc_task_t *task, isc_event_t *event) {
2230 t_info("task enter %d\n", taskno);
2233 t14_exclusiveerror = isc_task_beginexclusive(task);
2235 t_info("task %d got exclusive access\n", taskno);
2237 t_info("task %d failed to got exclusive access: %d\n",
2240 t_info("task %d state %d\n", i , t14_active[i]);
2244 isc_task_endexclusive(task);
2251 t_info("task exit %d\n", taskno);
2256 isc_task_send(task, &event);
2365 { (PFV) t1, "basic task subsystem" },