diff options
Diffstat (limited to 'include/linux/time.h')
-rw-r--r-- | include/linux/time.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/time.h b/include/linux/time.h index ea16c1a01d51..56787c093345 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -75,7 +75,7 @@ extern unsigned long mktime(const unsigned int year, const unsigned int mon, | |||
75 | const unsigned int day, const unsigned int hour, | 75 | const unsigned int day, const unsigned int hour, |
76 | const unsigned int min, const unsigned int sec); | 76 | const unsigned int min, const unsigned int sec); |
77 | 77 | ||
78 | extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); | 78 | extern void set_normalized_timespec(struct timespec *ts, time_t sec, s64 nsec); |
79 | extern struct timespec timespec_add_safe(const struct timespec lhs, | 79 | extern struct timespec timespec_add_safe(const struct timespec lhs, |
80 | const struct timespec rhs); | 80 | const struct timespec rhs); |
81 | 81 | ||
@@ -101,7 +101,8 @@ extern struct timespec xtime; | |||
101 | extern struct timespec wall_to_monotonic; | 101 | extern struct timespec wall_to_monotonic; |
102 | extern seqlock_t xtime_lock; | 102 | extern seqlock_t xtime_lock; |
103 | 103 | ||
104 | extern unsigned long read_persistent_clock(void); | 104 | extern void read_persistent_clock(struct timespec *ts); |
105 | extern void read_boot_clock(struct timespec *ts); | ||
105 | extern int update_persistent_clock(struct timespec now); | 106 | extern int update_persistent_clock(struct timespec now); |
106 | extern int no_sync_cmos_clock __read_mostly; | 107 | extern int no_sync_cmos_clock __read_mostly; |
107 | void timekeeping_init(void); | 108 | void timekeeping_init(void); |
@@ -109,6 +110,8 @@ extern int timekeeping_suspended; | |||
109 | 110 | ||
110 | unsigned long get_seconds(void); | 111 | unsigned long get_seconds(void); |
111 | struct timespec current_kernel_time(void); | 112 | struct timespec current_kernel_time(void); |
113 | struct timespec __current_kernel_time(void); /* does not hold xtime_lock */ | ||
114 | struct timespec get_monotonic_coarse(void); | ||
112 | 115 | ||
113 | #define CURRENT_TIME (current_kernel_time()) | 116 | #define CURRENT_TIME (current_kernel_time()) |
114 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) | 117 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) |
@@ -147,6 +150,7 @@ extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | |||
147 | extern int timekeeping_valid_for_hres(void); | 150 | extern int timekeeping_valid_for_hres(void); |
148 | extern void update_wall_time(void); | 151 | extern void update_wall_time(void); |
149 | extern void update_xtime_cache(u64 nsec); | 152 | extern void update_xtime_cache(u64 nsec); |
153 | extern void timekeeping_leap_insert(int leapsecond); | ||
150 | 154 | ||
151 | struct tms; | 155 | struct tms; |
152 | extern void do_sys_times(struct tms *); | 156 | extern void do_sys_times(struct tms *); |
@@ -241,6 +245,8 @@ struct itimerval { | |||
241 | #define CLOCK_PROCESS_CPUTIME_ID 2 | 245 | #define CLOCK_PROCESS_CPUTIME_ID 2 |
242 | #define CLOCK_THREAD_CPUTIME_ID 3 | 246 | #define CLOCK_THREAD_CPUTIME_ID 3 |
243 | #define CLOCK_MONOTONIC_RAW 4 | 247 | #define CLOCK_MONOTONIC_RAW 4 |
248 | #define CLOCK_REALTIME_COARSE 5 | ||
249 | #define CLOCK_MONOTONIC_COARSE 6 | ||
244 | 250 | ||
245 | /* | 251 | /* |
246 | * The IDs of various hardware clocks: | 252 | * The IDs of various hardware clocks: |