int main(void) { plan_lazy(); int r; evsched_t sched = { 0 }; worker_pool_t *pool = NULL; zone_t zone = { 0 }; r = evsched_init(&sched, NULL); ok(r == KNOT_EOK, "create scheduler"); pool = worker_pool_create(1); ok(pool != NULL, "create worker pool"); r = zone_events_init(&zone); ok(r == KNOT_EOK, "zone events init"); r = zone_events_setup(&zone, pool, &sched, NULL); ok(r == KNOT_EOK, "zone events setup"); test_scheduling(&zone); zone_events_deinit(&zone); worker_pool_destroy(pool); evsched_deinit(&sched); return 0; }
/*===========================================================================* * main * *===========================================================================*/ int main(void) { errct = 0; th_a = th_b = th_c = th_d = th_e = th_f = th_g = th_h = 0; mutex_a_step = mutex_b_step = mutex_c_step = 0; event_a_step = event_b_step = 0; rwlock_a_step = rwlock_b_step = 0; once = MTHREAD_ONCE_INIT; start(59); test_scheduling(); test_mutex(); test_event(); test_rwlock(); test_condition(); test_attributes(); test_keys(); quit(); return(0); /* Not reachable */ }