aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/time.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-07-16 17:04:02 -0400
committerJohn Stultz <john.stultz@linaro.org>2014-07-23 13:17:54 -0400
commit8b094cd03b4a3793220d8d8d86a173bfea8c285b (patch)
treefd0e63d38403f4413fa39095e1eff99f7b23d36c /include/linux/time.h
parent7d489d15ce4be5310ca60e5896df833f9b3b4088 (diff)
time: Consolidate the time accessor prototypes
Right now we have time related prototypes in 3 different header files. Move it to a single timekeeping header file and move the core internal stuff into a core private header. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux/time.h')
-rw-r--r--include/linux/time.h45
1 files changed, 4 insertions, 41 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index 234feac7f1c3..8c42cf8d2444 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -99,25 +99,7 @@ static inline bool timespec_valid_strict(const struct timespec *ts)
99 return true; 99 return true;
100} 100}
101 101
102extern bool persistent_clock_exist; 102extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
103
104static inline bool has_persistent_clock(void)
105{
106 return persistent_clock_exist;
107}
108
109extern void read_persistent_clock(struct timespec *ts);
110extern void read_boot_clock(struct timespec *ts);
111extern int persistent_clock_is_local;
112extern int update_persistent_clock(struct timespec now);
113void timekeeping_init(void);
114extern int timekeeping_suspended;
115
116unsigned long get_seconds(void);
117struct timespec current_kernel_time(void);
118struct timespec __current_kernel_time(void); /* does not take xtime_lock */
119struct timespec get_monotonic_coarse(void);
120void timekeeping_inject_sleeptime(struct timespec *delta);
121 103
122#define CURRENT_TIME (current_kernel_time()) 104#define CURRENT_TIME (current_kernel_time())
123#define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) 105#define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 })
@@ -135,33 +117,14 @@ void timekeeping_inject_sleeptime(struct timespec *delta);
135extern u32 (*arch_gettimeoffset)(void); 117extern u32 (*arch_gettimeoffset)(void);
136#endif 118#endif
137 119
138extern void do_gettimeofday(struct timeval *tv);
139extern int do_settimeofday(const struct timespec *tv);
140extern int do_sys_settimeofday(const struct timespec *tv,
141 const struct timezone *tz);
142#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts)
143extern long do_utimes(int dfd, const char __user *filename, struct timespec *times, int flags);
144struct itimerval; 120struct itimerval;
145extern int do_setitimer(int which, struct itimerval *value, 121extern int do_setitimer(int which, struct itimerval *value,
146 struct itimerval *ovalue); 122 struct itimerval *ovalue);
147extern unsigned int alarm_setitimer(unsigned int seconds);
148extern int do_getitimer(int which, struct itimerval *value); 123extern int do_getitimer(int which, struct itimerval *value);
149extern int __getnstimeofday(struct timespec *tv);
150extern void getnstimeofday(struct timespec *tv);
151extern void getrawmonotonic(struct timespec *ts);
152extern void getnstime_raw_and_real(struct timespec *ts_raw,
153 struct timespec *ts_real);
154extern void getboottime(struct timespec *ts);
155extern void monotonic_to_bootbased(struct timespec *ts);
156extern void get_monotonic_boottime(struct timespec *ts);
157 124
158extern struct timespec timespec_trunc(struct timespec t, unsigned gran); 125extern unsigned int alarm_setitimer(unsigned int seconds);
159extern int timekeeping_valid_for_hres(void); 126
160extern u64 timekeeping_max_deferment(void); 127extern long do_utimes(int dfd, const char __user *filename, struct timespec *times, int flags);
161extern int timekeeping_inject_offset(struct timespec *ts);
162extern s32 timekeeping_get_tai_offset(void);
163extern void timekeeping_set_tai_offset(s32 tai_offset);
164extern void timekeeping_clocktai(struct timespec *ts);
165 128
166struct tms; 129struct tms;
167extern void do_sys_times(struct tms *); 130extern void do_sys_times(struct tms *);