task_test.c revision de9282a1eaa50764fdc2e88046f8ff3522e3092e
3e14b69d196a3ebeecc4662c426344dcfd7db678Andreas Gustafssonmy_callback(isc_task_t task, isc_event_t event)
9aba20edee4e704433a464ae43b070b0775de506Mark Andrews for (i = 0; i < 1000000; i++)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonmy_shutdown(isc_task_t task, isc_event_t event) {
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonmy_tick(isc_task_t task, isc_event_t event)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson INSIST(isc_memctx_create(0, 0, &mctx) == ISC_R_SUCCESS);
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson INSIST(isc_taskmgr_create(mctx, workers, 0, &manager) == workers);
9a859983d7059a6eb9c877c1d2ac6a3a5b7170f7Evan Hunt INSIST(isc_task_create(manager, my_shutdown, "1", 0, &t1));
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson INSIST(isc_task_create(manager, my_shutdown, "2", 0, &t2));
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson INSIST(isc_task_create(manager, my_shutdown, "3", 0, &t3));
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein INSIST(isc_task_create(manager, my_shutdown, "4", 0, &t4));
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson INSIST(isc_timermgr_create(mctx, &timgr) == ISC_R_SUCCESS);
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson INSIST(isc_timer_create(timgr, isc_timertype_ticker,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson t1, my_tick, "foo", &ti1) == ISC_R_SUCCESS);
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson INSIST(isc_timer_create(timgr, isc_timertype_ticker,
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafsson t2, my_tick, "bar", &ti2) == ISC_R_SUCCESS);
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson event = isc_event_allocate(mctx, main, 1, my_callback, "1",
d6f99498d624d5c5c8ee45067df02e6a6b35a1a3Mark Andrews event = isc_event_allocate(mctx, main, 1, my_callback, "1",
d6f99498d624d5c5c8ee45067df02e6a6b35a1a3Mark Andrews event = isc_event_allocate(mctx, main, 1, my_callback, "1",
d6f99498d624d5c5c8ee45067df02e6a6b35a1a3Mark Andrews event = isc_event_allocate(mctx, main, 1, my_callback, "1",
d6f99498d624d5c5c8ee45067df02e6a6b35a1a3Mark Andrews event = isc_event_allocate(mctx, main, 1, my_callback, "1",
d6f99498d624d5c5c8ee45067df02e6a6b35a1a3Mark Andrews event = isc_event_allocate(mctx, main, 1, my_callback, "1",
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson event = isc_event_allocate(mctx, main, 1, my_callback, "1",
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson event = isc_event_allocate(mctx, main, 1, my_callback, "1",
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson event = isc_event_allocate(mctx, main, 1, my_callback, "1",
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson event = isc_event_allocate(mctx, main, 1, my_callback, "2",
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian Wellington event = isc_event_allocate(mctx, main, 1, my_callback, "3",
a76b380643a22f23a67a9df284e86cd7ef7608c1Mark Andrews event = isc_event_allocate(mctx, main, 1, my_callback, "4",
d0aebc5a55b6145297d94f8aee939852357c59fcMark Andrews event = isc_event_allocate(mctx, main, 1, my_callback, "2",
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian Wellington event = isc_event_allocate(mctx, main, 1, my_callback, "3",