aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorjohn stultz <johnstul@us.ibm.com>2007-02-16 04:28:17 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-16 11:14:00 -0500
commitacc9a9dcdd0dd1d295c2f2ee02c27c761bd63cb1 (patch)
tree78acee4323183da18586c9f4fc8a50999a2f4755 /include
parent88ad0bf6890505cbd9ca1dbb79944a27b5c8697d (diff)
[PATCH] generic: vsyscall-gtod support for GENERIC_TIME
Provides generic infrastructure for vsyscall-gtod. [akpm@osdl.org: cleanup] Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andi Kleen <ak@muc.de> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/clocksource.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 830a250ecf94..daa4940cc0f1 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -47,6 +47,7 @@ struct clocksource;
47 * @mult: cycle to nanosecond multiplier 47 * @mult: cycle to nanosecond multiplier
48 * @shift: cycle to nanosecond divisor (power of two) 48 * @shift: cycle to nanosecond divisor (power of two)
49 * @flags: flags describing special properties 49 * @flags: flags describing special properties
50 * @vread: vsyscall based read
50 * @cycle_interval: Used internally by timekeeping core, please ignore. 51 * @cycle_interval: Used internally by timekeeping core, please ignore.
51 * @xtime_interval: Used internally by timekeeping core, please ignore. 52 * @xtime_interval: Used internally by timekeeping core, please ignore.
52 */ 53 */
@@ -59,6 +60,7 @@ struct clocksource {
59 u32 mult; 60 u32 mult;
60 u32 shift; 61 u32 shift;
61 unsigned long flags; 62 unsigned long flags;
63 cycle_t (*vread)(void);
62 64
63 /* timekeeping specific data, ignore */ 65 /* timekeeping specific data, ignore */
64 cycle_t cycle_last, cycle_interval; 66 cycle_t cycle_last, cycle_interval;
@@ -197,4 +199,12 @@ extern int clocksource_register(struct clocksource*);
197extern struct clocksource* clocksource_get_next(void); 199extern struct clocksource* clocksource_get_next(void);
198extern void clocksource_change_rating(struct clocksource *cs, int rating); 200extern void clocksource_change_rating(struct clocksource *cs, int rating);
199 201
202#ifdef CONFIG_GENERIC_TIME_VSYSCALL
203extern void update_vsyscall(struct timespec *ts, struct clocksource *c);
204#else
205static inline void update_vsyscall(struct timespec *ts, struct clocksource *c)
206{
207}
208#endif
209
200#endif /* _LINUX_CLOCKSOURCE_H */ 210#endif /* _LINUX_CLOCKSOURCE_H */