diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2006-01-12 11:36:14 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2006-01-12 11:36:14 +0100 |
commit | e2787630c1abb075c935cf47e91beb7c656f48c4 (patch) | |
tree | 43b6ee44b9f81fdb33283313f167d6ecec2b0243 /include | |
parent | 288867ec5c377db82933b64460ce050e5c998ee9 (diff) | |
download | linux-e2787630c1abb075c935cf47e91beb7c656f48c4.tar.gz linux-e2787630c1abb075c935cf47e91beb7c656f48c4.tar.bz2 linux-e2787630c1abb075c935cf47e91beb7c656f48c4.zip |
[hrtimer] Change resolution storage to ktime_t format
Change the storage format of the per base resolution to ktime_t to
make it easier accessible in the hrtimers code.
Change the resolution from (NSEC_PER_SEC/HZ) to TICK_NSEC as Roman
pointed out. TICK_NSEC is closer to the real resolution.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hrtimer.h | 2 | ||||
-rw-r--r-- | include/linux/ktime.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index abb674c9b764..98c5c1537b5d 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -85,7 +85,7 @@ struct hrtimer_base { spinlock_t lock; struct rb_root active; struct rb_node *first; - unsigned long resolution; + ktime_t resolution; ktime_t (*get_time)(void); struct hrtimer *curr_timer; }; diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 222a047cc145..1bd6552cc341 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h @@ -272,8 +272,8 @@ static inline u64 ktime_to_ns(const ktime_t kt) * idea of the (in)accuracy of timers. Timer values are rounded up to * this resolution values. */ -#define KTIME_REALTIME_RES (NSEC_PER_SEC/HZ) -#define KTIME_MONOTONIC_RES (NSEC_PER_SEC/HZ) +#define KTIME_REALTIME_RES (ktime_t){ .tv64 = TICK_NSEC } +#define KTIME_MONOTONIC_RES (ktime_t){ .tv64 = TICK_NSEC } /* Get the monotonic time in timespec format: */ extern void ktime_get_ts(struct timespec *ts); |