4 #include <lwk/idspace.h>
8 * This structure defines a timer, including when the timer should expire
9 * and the callback function to call when it expires. The callback function
10 * runs in interrupt context with interrupts disabled.
13 struct list_head link;
14 id_t cpu; /* CPU this timer is installed on */
15 uint64_t expires; /* Time when this timer expires */
16 uintptr_t data; /* arg to pass to function */
17 void (*function)(uintptr_t); /* executed when timer expires */
23 void timer_add(struct timer *timer);
24 void timer_del(struct timer *timer);
25 uint64_t timer_sleep_until(uint64_t when);
28 * Internal timer-subsystem functions.
29 * Normal kernel code and drivers should not call these.
31 int timer_subsys_init(void);
32 void expire_timers(void);
33 void schedule_next_wakeup(void);
36 * Architecture-dependent timer functions.
38 void arch_schedule_next_wakeup(uint64_t when);