aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/hrtimer.h2
-rw-r--r--include/linux/timex.h9
2 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 600fc3bcf63e..1ad56a7b2f74 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -316,7 +316,7 @@ static inline u64 hrtimer_forward_now(struct hrtimer *timer,
316 316
317/* Precise sleep: */ 317/* Precise sleep: */
318extern long hrtimer_nanosleep(struct timespec *rqtp, 318extern long hrtimer_nanosleep(struct timespec *rqtp,
319 struct timespec *rmtp, 319 struct timespec __user *rmtp,
320 const enum hrtimer_mode mode, 320 const enum hrtimer_mode mode,
321 const clockid_t clockid); 321 const clockid_t clockid);
322extern long hrtimer_nanosleep_restart(struct restart_block *restart_block); 322extern long hrtimer_nanosleep_restart(struct restart_block *restart_block);
diff --git a/include/linux/timex.h b/include/linux/timex.h
index 8ea3e71ba7fa..c3f374786a43 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -232,7 +232,14 @@ static inline int ntp_synced(void)
232#else 232#else
233#define NTP_INTERVAL_FREQ (HZ) 233#define NTP_INTERVAL_FREQ (HZ)
234#endif 234#endif
235#define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ) 235
236#define CLOCK_TICK_OVERFLOW (LATCH * HZ - CLOCK_TICK_RATE)
237#define CLOCK_TICK_ADJUST (((s64)CLOCK_TICK_OVERFLOW * NSEC_PER_SEC) / \
238 (s64)CLOCK_TICK_RATE)
239
240/* Because using NSEC_PER_SEC would be too easy */
241#define NTP_INTERVAL_LENGTH ((((s64)TICK_USEC * NSEC_PER_USEC * USER_HZ) + \
242 CLOCK_TICK_ADJUST) / NTP_INTERVAL_FREQ)
236 243
237/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ 244/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */
238extern u64 current_tick_length(void); 245extern u64 current_tick_length(void);