static void wheel_timer_thread(struct event *t);
-static void wheel_timer_thread_helper(struct event *t)
+static void wheel_timer_thread(struct event *t)
{
struct listnode *node, *nextnode;
unsigned long long curr_slot;
wheel->nexttime * slots_to_skip, &wheel->timer);
}
-static void wheel_timer_thread(struct event *t)
-{
- struct timer_wheel *wheel;
-
- wheel = EVENT_ARG(t);
-
- event_execute(wheel->master, wheel_timer_thread_helper, wheel, 0, NULL);
-}
-
struct timer_wheel *wheel_init(struct event_loop *master, int period,
size_t slots,
unsigned int (*slot_key)(const void *),
wheel = XCALLOC(MTYPE_TIMER_WHEEL, sizeof(struct timer_wheel));
- wheel->name = XSTRDUP(MTYPE_TIMER_WHEEL, run_name);
wheel->slot_key = slot_key;
wheel->slot_run = slot_run;
EVENT_OFF(wheel->timer);
XFREE(MTYPE_TIMER_WHEEL_LIST, wheel->wheel_slot_lists);
- XFREE(MTYPE_TIMER_WHEEL, wheel->name);
XFREE(MTYPE_TIMER_WHEEL, wheel);
}