diff options
author | Alexander Gordeev <lasaine@lvk.cs.msu.su> | 2011-01-12 20:00:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:21 -0500 |
commit | e2c18e49a0d4f822ffc29fb4958943beb1ff08b7 (patch) | |
tree | 227dbb544277f7908fa1666ce21a15e6b2282ccb /include/linux/time.h | |
parent | 025b40abe715d638e60516a657d354e8560c1a85 (diff) |
pps: capture MONOTONIC_RAW timestamps as well
MONOTONIC_RAW clock timestamps are ideally suited for frequency
calculation and also fit well into the original NTP hardpps design. Now
phase and frequency can be adjusted separately: the former based on
REALTIME clock and the latter based on MONOTONIC_RAW clock.
A new function getnstime_raw_and_real is added to timekeeping subsystem to
capture both timestamps at the same time and atomically.
Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Rodolfo Giometti <giometti@enneenne.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/time.h')
-rw-r--r-- | include/linux/time.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/time.h b/include/linux/time.h index 9f15ac7ab92a..1e6d3b59238d 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -158,6 +158,8 @@ extern unsigned int alarm_setitimer(unsigned int seconds); | |||
158 | extern int do_getitimer(int which, struct itimerval *value); | 158 | extern int do_getitimer(int which, struct itimerval *value); |
159 | extern void getnstimeofday(struct timespec *tv); | 159 | extern void getnstimeofday(struct timespec *tv); |
160 | extern void getrawmonotonic(struct timespec *ts); | 160 | extern void getrawmonotonic(struct timespec *ts); |
161 | extern void getnstime_raw_and_real(struct timespec *ts_raw, | ||
162 | struct timespec *ts_real); | ||
161 | extern void getboottime(struct timespec *ts); | 163 | extern void getboottime(struct timespec *ts); |
162 | extern void monotonic_to_bootbased(struct timespec *ts); | 164 | extern void monotonic_to_bootbased(struct timespec *ts); |
163 | 165 | ||