diff options
Diffstat (limited to 'include/linux/time.h')
-rw-r--r-- | include/linux/time.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/time.h b/include/linux/time.h index 1e6d3b59238d..454a26205787 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -113,8 +113,6 @@ static inline struct timespec timespec_sub(struct timespec lhs, | |||
113 | #define timespec_valid(ts) \ | 113 | #define timespec_valid(ts) \ |
114 | (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) | 114 | (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) |
115 | 115 | ||
116 | extern seqlock_t xtime_lock; | ||
117 | |||
118 | extern void read_persistent_clock(struct timespec *ts); | 116 | extern void read_persistent_clock(struct timespec *ts); |
119 | extern void read_boot_clock(struct timespec *ts); | 117 | extern void read_boot_clock(struct timespec *ts); |
120 | extern int update_persistent_clock(struct timespec now); | 118 | extern int update_persistent_clock(struct timespec now); |
@@ -125,8 +123,9 @@ extern int timekeeping_suspended; | |||
125 | unsigned long get_seconds(void); | 123 | unsigned long get_seconds(void); |
126 | struct timespec current_kernel_time(void); | 124 | struct timespec current_kernel_time(void); |
127 | struct timespec __current_kernel_time(void); /* does not take xtime_lock */ | 125 | struct timespec __current_kernel_time(void); /* does not take xtime_lock */ |
128 | struct timespec __get_wall_to_monotonic(void); /* does not take xtime_lock */ | ||
129 | struct timespec get_monotonic_coarse(void); | 126 | struct timespec get_monotonic_coarse(void); |
127 | void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, | ||
128 | struct timespec *wtom, struct timespec *sleep); | ||
130 | 129 | ||
131 | #define CURRENT_TIME (current_kernel_time()) | 130 | #define CURRENT_TIME (current_kernel_time()) |
132 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) | 131 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) |
@@ -147,8 +146,9 @@ static inline u32 arch_gettimeoffset(void) { return 0; } | |||
147 | #endif | 146 | #endif |
148 | 147 | ||
149 | extern void do_gettimeofday(struct timeval *tv); | 148 | extern void do_gettimeofday(struct timeval *tv); |
150 | extern int do_settimeofday(struct timespec *tv); | 149 | extern int do_settimeofday(const struct timespec *tv); |
151 | extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); | 150 | extern int do_sys_settimeofday(const struct timespec *tv, |
151 | const struct timezone *tz); | ||
152 | #define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) | 152 | #define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) |
153 | extern long do_utimes(int dfd, const char __user *filename, struct timespec *times, int flags); | 153 | extern long do_utimes(int dfd, const char __user *filename, struct timespec *times, int flags); |
154 | struct itimerval; | 154 | struct itimerval; |
@@ -162,12 +162,13 @@ extern void getnstime_raw_and_real(struct timespec *ts_raw, | |||
162 | struct timespec *ts_real); | 162 | struct timespec *ts_real); |
163 | extern void getboottime(struct timespec *ts); | 163 | extern void getboottime(struct timespec *ts); |
164 | extern void monotonic_to_bootbased(struct timespec *ts); | 164 | extern void monotonic_to_bootbased(struct timespec *ts); |
165 | extern void get_monotonic_boottime(struct timespec *ts); | ||
165 | 166 | ||
166 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | 167 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); |
167 | extern int timekeeping_valid_for_hres(void); | 168 | extern int timekeeping_valid_for_hres(void); |
168 | extern u64 timekeeping_max_deferment(void); | 169 | extern u64 timekeeping_max_deferment(void); |
169 | extern void update_wall_time(void); | ||
170 | extern void timekeeping_leap_insert(int leapsecond); | 170 | extern void timekeeping_leap_insert(int leapsecond); |
171 | extern int timekeeping_inject_offset(struct timespec *ts); | ||
171 | 172 | ||
172 | struct tms; | 173 | struct tms; |
173 | extern void do_sys_times(struct tms *); | 174 | extern void do_sys_times(struct tms *); |
@@ -292,6 +293,7 @@ struct itimerval { | |||
292 | #define CLOCK_MONOTONIC_RAW 4 | 293 | #define CLOCK_MONOTONIC_RAW 4 |
293 | #define CLOCK_REALTIME_COARSE 5 | 294 | #define CLOCK_REALTIME_COARSE 5 |
294 | #define CLOCK_MONOTONIC_COARSE 6 | 295 | #define CLOCK_MONOTONIC_COARSE 6 |
296 | #define CLOCK_BOOTTIME 7 | ||
295 | 297 | ||
296 | /* | 298 | /* |
297 | * The IDs of various hardware clocks: | 299 | * The IDs of various hardware clocks: |