aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/time.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/time.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/time.h')
-rw-r--r--include/linux/time.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index 9f15ac7ab92a..b3061782dec3 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
116extern seqlock_t xtime_lock;
117
118extern void read_persistent_clock(struct timespec *ts); 116extern void read_persistent_clock(struct timespec *ts);
119extern void read_boot_clock(struct timespec *ts); 117extern void read_boot_clock(struct timespec *ts);
120extern int update_persistent_clock(struct timespec now); 118extern int update_persistent_clock(struct timespec now);
@@ -125,8 +123,10 @@ extern int timekeeping_suspended;
125unsigned long get_seconds(void); 123unsigned long get_seconds(void);
126struct timespec current_kernel_time(void); 124struct timespec current_kernel_time(void);
127struct timespec __current_kernel_time(void); /* does not take xtime_lock */ 125struct timespec __current_kernel_time(void); /* does not take xtime_lock */
128struct timespec __get_wall_to_monotonic(void); /* does not take xtime_lock */
129struct timespec get_monotonic_coarse(void); 126struct timespec get_monotonic_coarse(void);
127void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim,
128 struct timespec *wtom, struct timespec *sleep);
129void timekeeping_inject_sleeptime(struct timespec *delta);
130 130
131#define CURRENT_TIME (current_kernel_time()) 131#define CURRENT_TIME (current_kernel_time())
132#define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) 132#define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 })
@@ -147,8 +147,9 @@ static inline u32 arch_gettimeoffset(void) { return 0; }
147#endif 147#endif
148 148
149extern void do_gettimeofday(struct timeval *tv); 149extern void do_gettimeofday(struct timeval *tv);
150extern int do_settimeofday(struct timespec *tv); 150extern int do_settimeofday(const struct timespec *tv);
151extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); 151extern int do_sys_settimeofday(const struct timespec *tv,
152 const struct timezone *tz);
152#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) 153#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts)
153extern long do_utimes(int dfd, const char __user *filename, struct timespec *times, int flags); 154extern long do_utimes(int dfd, const char __user *filename, struct timespec *times, int flags);
154struct itimerval; 155struct itimerval;
@@ -158,14 +159,17 @@ extern unsigned int alarm_setitimer(unsigned int seconds);
158extern int do_getitimer(int which, struct itimerval *value); 159extern int do_getitimer(int which, struct itimerval *value);
159extern void getnstimeofday(struct timespec *tv); 160extern void getnstimeofday(struct timespec *tv);
160extern void getrawmonotonic(struct timespec *ts); 161extern void getrawmonotonic(struct timespec *ts);
162extern void getnstime_raw_and_real(struct timespec *ts_raw,
163 struct timespec *ts_real);
161extern void getboottime(struct timespec *ts); 164extern void getboottime(struct timespec *ts);
162extern void monotonic_to_bootbased(struct timespec *ts); 165extern void monotonic_to_bootbased(struct timespec *ts);
166extern void get_monotonic_boottime(struct timespec *ts);
163 167
164extern struct timespec timespec_trunc(struct timespec t, unsigned gran); 168extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
165extern int timekeeping_valid_for_hres(void); 169extern int timekeeping_valid_for_hres(void);
166extern u64 timekeeping_max_deferment(void); 170extern u64 timekeeping_max_deferment(void);
167extern void update_wall_time(void);
168extern void timekeeping_leap_insert(int leapsecond); 171extern void timekeeping_leap_insert(int leapsecond);
172extern int timekeeping_inject_offset(struct timespec *ts);
169 173
170struct tms; 174struct tms;
171extern void do_sys_times(struct tms *); 175extern void do_sys_times(struct tms *);
@@ -290,6 +294,9 @@ struct itimerval {
290#define CLOCK_MONOTONIC_RAW 4 294#define CLOCK_MONOTONIC_RAW 4
291#define CLOCK_REALTIME_COARSE 5 295#define CLOCK_REALTIME_COARSE 5
292#define CLOCK_MONOTONIC_COARSE 6 296#define CLOCK_MONOTONIC_COARSE 6
297#define CLOCK_BOOTTIME 7
298#define CLOCK_REALTIME_ALARM 8
299#define CLOCK_BOOTTIME_ALARM 9
293 300
294/* 301/*
295 * The IDs of various hardware clocks: 302 * The IDs of various hardware clocks: