summaryrefslogtreecommitdiff
path: root/include/linux/timex.h
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-09-30 23:28:22 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 00:39:26 -0700
commitb0ee75561beadc4db4d9a899c8ef4a7db50aa0ab (patch)
treee50354c74ce17f6ea78dc1d7fac608788de517f3 /include/linux/timex.h
parent4c7ee8de956fc250fe31e2fa91f6da980fabe317 (diff)
downloadlwn-b0ee75561beadc4db4d9a899c8ef4a7db50aa0ab.tar.gz
lwn-b0ee75561beadc4db4d9a899c8ef4a7db50aa0ab.zip
[PATCH] ntp: add ntp_update_frequency
This introduces ntp_update_frequency() and deinlines ntp_clear() (as it's not performance critical). ntp_update_frequency() calculates the base tick length using tick_usec and adds a base adjustment, in case the frequency doesn't divide evenly by HZ. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Cc: john stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/timex.h')
-rw-r--r--include/linux/timex.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/include/linux/timex.h b/include/linux/timex.h
index 2a21485bf183..b589c8218bb9 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -219,18 +219,8 @@ extern long time_reftime; /* time at last adjustment (s) */
extern long time_adjust; /* The amount of adjtime left */
extern long time_next_adjust; /* Value for time_adjust at next tick */
-/**
- * ntp_clear - Clears the NTP state variables
- *
- * Must be called while holding a write on the xtime_lock
- */
-static inline void ntp_clear(void)
-{
- time_adjust = 0; /* stop active adjtime() */
- time_status |= STA_UNSYNC;
- time_maxerror = NTP_PHASE_LIMIT;
- time_esterror = NTP_PHASE_LIMIT;
-}
+extern void ntp_clear(void);
+extern void ntp_update_frequency(void);
/**
* ntp_synced - Returns 1 if the NTP status is not UNSYNC