diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2011-07-27 13:26:05 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2011-07-27 13:26:05 -0400 |
commit | c85097f009364deefd0923a9311042342d7e35f1 (patch) | |
tree | b04a03dae1e9a7dc80d0bfcc8e53eb7b41e7a776 /include/linux/hrtimer.h | |
parent | f83fa3def377859beb05d55ab6518e5799b550d2 (diff) | |
parent | 61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (diff) |
Merge commit 'v2.6.39' into wip-merge-2.6.39
Conflicts:
Makefile
arch/arm/kernel/calls.S
arch/x86/include/asm/unistd_32.h
arch/x86/kernel/syscall_table_32.S
kernel/sched.c
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r-- | include/linux/hrtimer.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index d0cb2f7c5b08..a58956e14bca 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -54,11 +54,13 @@ enum hrtimer_restart { | |||
54 | * 0x00 inactive | 54 | * 0x00 inactive |
55 | * 0x01 enqueued into rbtree | 55 | * 0x01 enqueued into rbtree |
56 | * 0x02 callback function running | 56 | * 0x02 callback function running |
57 | * 0x04 timer is migrated to another cpu | ||
57 | * | 58 | * |
58 | * Special cases: | 59 | * Special cases: |
59 | * 0x03 callback function running and enqueued | 60 | * 0x03 callback function running and enqueued |
60 | * (was requeued on another CPU) | 61 | * (was requeued on another CPU) |
61 | * 0x09 timer was migrated on CPU hotunplug | 62 | * 0x05 timer was migrated on CPU hotunplug |
63 | * | ||
62 | * The "callback function running and enqueued" status is only possible on | 64 | * The "callback function running and enqueued" status is only possible on |
63 | * SMP. It happens for example when a posix timer expired and the callback | 65 | * SMP. It happens for example when a posix timer expired and the callback |
64 | * queued a signal. Between dropping the lock which protects the posix timer | 66 | * queued a signal. Between dropping the lock which protects the posix timer |
@@ -67,8 +69,11 @@ enum hrtimer_restart { | |||
67 | * as otherwise the timer could be removed before the softirq code finishes the | 69 | * as otherwise the timer could be removed before the softirq code finishes the |
68 | * the handling of the timer. | 70 | * the handling of the timer. |
69 | * | 71 | * |
70 | * The HRTIMER_STATE_ENQUEUED bit is always or'ed to the current state to | 72 | * The HRTIMER_STATE_ENQUEUED bit is always or'ed to the current state |
71 | * preserve the HRTIMER_STATE_CALLBACK bit in the above scenario. | 73 | * to preserve the HRTIMER_STATE_CALLBACK in the above scenario. This |
74 | * also affects HRTIMER_STATE_MIGRATE where the preservation is not | ||
75 | * necessary. HRTIMER_STATE_MIGRATE is cleared after the timer is | ||
76 | * enqueued on the new cpu. | ||
72 | * | 77 | * |
73 | * All state transitions are protected by cpu_base->lock. | 78 | * All state transitions are protected by cpu_base->lock. |
74 | */ | 79 | */ |
@@ -148,7 +153,12 @@ struct hrtimer_clock_base { | |||
148 | #endif | 153 | #endif |
149 | }; | 154 | }; |
150 | 155 | ||
151 | #define HRTIMER_MAX_CLOCK_BASES 2 | 156 | enum hrtimer_base_type { |
157 | HRTIMER_BASE_REALTIME, | ||
158 | HRTIMER_BASE_MONOTONIC, | ||
159 | HRTIMER_BASE_BOOTTIME, | ||
160 | HRTIMER_MAX_CLOCK_BASES, | ||
161 | }; | ||
152 | 162 | ||
153 | /* | 163 | /* |
154 | * struct hrtimer_cpu_base - the per cpu clock bases | 164 | * struct hrtimer_cpu_base - the per cpu clock bases |
@@ -333,6 +343,7 @@ static inline int hrtimer_is_hres_active(struct hrtimer *timer) | |||
333 | 343 | ||
334 | extern ktime_t ktime_get(void); | 344 | extern ktime_t ktime_get(void); |
335 | extern ktime_t ktime_get_real(void); | 345 | extern ktime_t ktime_get_real(void); |
346 | extern ktime_t ktime_get_boottime(void); | ||
336 | 347 | ||
337 | 348 | ||
338 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); | 349 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); |
@@ -402,8 +413,9 @@ extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); | |||
402 | extern ktime_t hrtimer_get_next_event(void); | 413 | extern ktime_t hrtimer_get_next_event(void); |
403 | 414 | ||
404 | /* | 415 | /* |
405 | * A timer is active, when it is enqueued into the rbtree or the callback | 416 | * A timer is active, when it is enqueued into the rbtree or the |
406 | * function is running. | 417 | * callback function is running or it's in the state of being migrated |
418 | * to another cpu. | ||
407 | */ | 419 | */ |
408 | static inline int hrtimer_active(const struct hrtimer *timer) | 420 | static inline int hrtimer_active(const struct hrtimer *timer) |
409 | { | 421 | { |