diff options
Diffstat (limited to 'include/linux/time.h')
-rw-r--r-- | include/linux/time.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/time.h b/include/linux/time.h index 4d358e9d10f1..d4835dfdf25e 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -115,8 +115,20 @@ static inline bool timespec_valid_strict(const struct timespec *ts) | |||
115 | return true; | 115 | return true; |
116 | } | 116 | } |
117 | 117 | ||
118 | extern bool persistent_clock_exist; | ||
119 | |||
120 | #ifdef ALWAYS_USE_PERSISTENT_CLOCK | ||
121 | #define has_persistent_clock() true | ||
122 | #else | ||
123 | static inline bool has_persistent_clock(void) | ||
124 | { | ||
125 | return persistent_clock_exist; | ||
126 | } | ||
127 | #endif | ||
128 | |||
118 | extern void read_persistent_clock(struct timespec *ts); | 129 | extern void read_persistent_clock(struct timespec *ts); |
119 | extern void read_boot_clock(struct timespec *ts); | 130 | extern void read_boot_clock(struct timespec *ts); |
131 | extern int persistent_clock_is_local; | ||
120 | extern int update_persistent_clock(struct timespec now); | 132 | extern int update_persistent_clock(struct timespec now); |
121 | void timekeeping_init(void); | 133 | void timekeeping_init(void); |
122 | extern int timekeeping_suspended; | 134 | extern int timekeeping_suspended; |
@@ -142,9 +154,7 @@ void timekeeping_inject_sleeptime(struct timespec *delta); | |||
142 | * finer then tick granular time. | 154 | * finer then tick granular time. |
143 | */ | 155 | */ |
144 | #ifdef CONFIG_ARCH_USES_GETTIMEOFFSET | 156 | #ifdef CONFIG_ARCH_USES_GETTIMEOFFSET |
145 | extern u32 arch_gettimeoffset(void); | 157 | extern u32 (*arch_gettimeoffset)(void); |
146 | #else | ||
147 | static inline u32 arch_gettimeoffset(void) { return 0; } | ||
148 | #endif | 158 | #endif |
149 | 159 | ||
150 | extern void do_gettimeofday(struct timeval *tv); | 160 | extern void do_gettimeofday(struct timeval *tv); |
@@ -158,6 +168,7 @@ extern int do_setitimer(int which, struct itimerval *value, | |||
158 | struct itimerval *ovalue); | 168 | struct itimerval *ovalue); |
159 | extern unsigned int alarm_setitimer(unsigned int seconds); | 169 | extern unsigned int alarm_setitimer(unsigned int seconds); |
160 | extern int do_getitimer(int which, struct itimerval *value); | 170 | extern int do_getitimer(int which, struct itimerval *value); |
171 | extern int __getnstimeofday(struct timespec *tv); | ||
161 | extern void getnstimeofday(struct timespec *tv); | 172 | extern void getnstimeofday(struct timespec *tv); |
162 | extern void getrawmonotonic(struct timespec *ts); | 173 | extern void getrawmonotonic(struct timespec *ts); |
163 | extern void getnstime_raw_and_real(struct timespec *ts_raw, | 174 | extern void getnstime_raw_and_real(struct timespec *ts_raw, |