diff options
Diffstat (limited to 'include/linux/posix-timers.h')
-rw-r--r-- | include/linux/posix-timers.h | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 3c0a5beb7f0d..54faf5236da0 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
@@ -51,12 +51,8 @@ struct k_itimer { | |||
51 | struct sigqueue *sigq; /* signal queue entry. */ | 51 | struct sigqueue *sigq; /* signal queue entry. */ |
52 | union { | 52 | union { |
53 | struct { | 53 | struct { |
54 | struct timer_list timer; | 54 | struct hrtimer timer; |
55 | /* clock abs_timer_list: */ | 55 | ktime_t interval; |
56 | struct list_head abs_timer_entry; | ||
57 | /* wall_to_monotonic used when set: */ | ||
58 | struct timespec wall_to_prev; | ||
59 | unsigned long incr; /* interval in jiffies */ | ||
60 | } real; | 56 | } real; |
61 | struct cpu_timer_list cpu; | 57 | struct cpu_timer_list cpu; |
62 | struct { | 58 | struct { |
@@ -68,15 +64,9 @@ struct k_itimer { | |||
68 | } it; | 64 | } it; |
69 | }; | 65 | }; |
70 | 66 | ||
71 | struct k_clock_abs { | ||
72 | struct list_head list; | ||
73 | spinlock_t lock; | ||
74 | }; | ||
75 | |||
76 | struct k_clock { | 67 | struct k_clock { |
77 | int res; /* in nanoseconds */ | 68 | int res; /* in nanoseconds */ |
78 | int (*clock_getres) (const clockid_t which_clock, struct timespec *tp); | 69 | int (*clock_getres) (const clockid_t which_clock, struct timespec *tp); |
79 | struct k_clock_abs *abs_struct; | ||
80 | int (*clock_set) (const clockid_t which_clock, struct timespec * tp); | 70 | int (*clock_set) (const clockid_t which_clock, struct timespec * tp); |
81 | int (*clock_get) (const clockid_t which_clock, struct timespec * tp); | 71 | int (*clock_get) (const clockid_t which_clock, struct timespec * tp); |
82 | int (*timer_create) (struct k_itimer *timer); | 72 | int (*timer_create) (struct k_itimer *timer); |
@@ -102,29 +92,6 @@ int do_posix_clock_nosettime(const clockid_t, struct timespec *tp); | |||
102 | /* function to call to trigger timer event */ | 92 | /* function to call to trigger timer event */ |
103 | int posix_timer_event(struct k_itimer *timr, int si_private); | 93 | int posix_timer_event(struct k_itimer *timr, int si_private); |
104 | 94 | ||
105 | struct now_struct { | ||
106 | unsigned long jiffies; | ||
107 | }; | ||
108 | |||
109 | #define posix_get_now(now) \ | ||
110 | do { (now)->jiffies = jiffies; } while (0) | ||
111 | |||
112 | #define posix_time_before(timer, now) \ | ||
113 | time_before((timer)->expires, (now)->jiffies) | ||
114 | |||
115 | #define posix_bump_timer(timr, now) \ | ||
116 | do { \ | ||
117 | long delta, orun; \ | ||
118 | \ | ||
119 | delta = (now).jiffies - (timr)->it.real.timer.expires; \ | ||
120 | if (delta >= 0) { \ | ||
121 | orun = 1 + (delta / (timr)->it.real.incr); \ | ||
122 | (timr)->it.real.timer.expires += \ | ||
123 | orun * (timr)->it.real.incr; \ | ||
124 | (timr)->it_overrun += orun; \ | ||
125 | } \ | ||
126 | } while (0) | ||
127 | |||
128 | int posix_cpu_clock_getres(const clockid_t which_clock, struct timespec *ts); | 95 | int posix_cpu_clock_getres(const clockid_t which_clock, struct timespec *ts); |
129 | int posix_cpu_clock_get(const clockid_t which_clock, struct timespec *ts); | 96 | int posix_cpu_clock_get(const clockid_t which_clock, struct timespec *ts); |
130 | int posix_cpu_clock_set(const clockid_t which_clock, const struct timespec *ts); | 97 | int posix_cpu_clock_set(const clockid_t which_clock, const struct timespec *ts); |