Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linuxkpi/common/include/linux/timer.h
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | |||||
} while (0) | } while (0) | ||||
#define init_timer(timer) do { \ | #define init_timer(timer) do { \ | ||||
(timer)->function = NULL; \ | (timer)->function = NULL; \ | ||||
(timer)->data = 0; \ | (timer)->data = 0; \ | ||||
callout_init(&(timer)->callout, 1); \ | callout_init(&(timer)->callout, 1); \ | ||||
} while (0) | } while (0) | ||||
extern void mod_timer(struct timer_list *, int); | extern int mod_timer(struct timer_list *, int); | ||||
extern void add_timer(struct timer_list *); | extern void add_timer(struct timer_list *); | ||||
extern void add_timer_on(struct timer_list *, int cpu); | extern void add_timer_on(struct timer_list *, int cpu); | ||||
extern int del_timer(struct timer_list *); | extern int del_timer(struct timer_list *); | ||||
extern int del_timer_sync(struct timer_list *); | |||||
#define del_timer_sync(timer) (void)callout_drain(&(timer)->callout) | |||||
#define timer_pending(timer) callout_pending(&(timer)->callout) | #define timer_pending(timer) callout_pending(&(timer)->callout) | ||||
#define round_jiffies(j) \ | #define round_jiffies(j) \ | ||||
((int)(((j) + linux_timer_hz_mask) & ~linux_timer_hz_mask)) | ((int)(((j) + linux_timer_hz_mask) & ~linux_timer_hz_mask)) | ||||
#define round_jiffies_relative(j) round_jiffies(j) | #define round_jiffies_relative(j) round_jiffies(j) | ||||
#define round_jiffies_up(j) round_jiffies(j) | #define round_jiffies_up(j) round_jiffies(j) | ||||
#define round_jiffies_up_relative(j) round_jiffies_up(j) | #define round_jiffies_up_relative(j) round_jiffies_up(j) | ||||
#endif /* _LINUX_TIMER_H_ */ | #endif /* _LINUX_TIMER_H_ */ |