26 #include <linux/jiffies.h> 27 #include <linux/version.h> 36 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) 54 struct timer_list *tl = &timer->
t_timer;
56 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) 60 tl->data = (
unsigned long)tl;
76 expire = expire > now ?
m0_time_sub(expire, now) : 0;
79 timer->
t_timer.expires = jiffies + timespec_to_jiffies(&ts);
90 del_timer_sync(&timer->
t_timer);
int(* tmr_init)(struct m0_timer *timer, struct m0_timer_locality *loc)
uint64_t m0_time_nanoseconds(const m0_time_t time)
struct timer_list t_timer
static void timer_kernel_fini(struct m0_timer *timer)
#define container_of(ptr, type, member)
M0_INTERNAL void m0_thread_leave(void)
static void timer_kernel_start(struct m0_timer *timer)
m0_time_t m0_time_now(void)
M0_INTERNAL void m0_thread_enter(struct m0_thread *thread, bool full)
uint64_t m0_time_seconds(const m0_time_t time)
static void timer_kernel_stop(struct m0_timer *timer)
m0_time_t m0_time_sub(const m0_time_t t1, const m0_time_t t2)
M0_INTERNAL const struct m0_timer_operations m0_timer_ops[]
static void timer_kernel_trampoline_callback(struct timer_list *tl)
static int timer_kernel_init(struct m0_timer *timer, struct m0_timer_locality *loc)
M0_INTERNAL void m0_timer_callback_execute(struct m0_timer *timer)