1 #ifndef _linux_POSIX_TIMERS_H
2 #define _linux_POSIX_TIMERS_H
4 #include <linux/spinlock.h>
5 #include <linux/list.h>
12 int res
; /* in nano seconds */
13 struct k_clock_abs
*abs_struct
;
14 int (*clock_set
) (struct timespec
* tp
);
15 int (*clock_get
) (struct timespec
* tp
);
16 int (*nsleep
) (int flags
,
17 struct timespec
* new_setting
,
18 struct itimerspec
* old_setting
);
19 int (*timer_set
) (struct k_itimer
* timr
, int flags
,
20 struct itimerspec
* new_setting
,
21 struct itimerspec
* old_setting
);
22 int (*timer_del
) (struct k_itimer
* timr
);
23 void (*timer_get
) (struct k_itimer
* timr
,
24 struct itimerspec
* cur_setting
);
27 unsigned long jiffies
;
30 #define posix_get_now(now) (now)->jiffies = jiffies;
31 #define posix_time_before(timer, now) \
32 time_before((timer)->expires, (now)->jiffies)
34 #define posix_bump_timer(timr, now) \
37 delta = now.jiffies - (timr)->it_timer.expires; \
39 orun = 1 + (delta / (timr)->it_incr); \
40 (timr)->it_timer.expires += orun * (timr)->it_incr; \
41 (timr)->it_overrun += orun; \