diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 13:13:28 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 13:13:28 -0500 |
| commit | d82012695ef29e4e1c8153ccf43098ec8e50369e (patch) | |
| tree | 80a379de91a332a6dca5f035d10421bb6d988b80 /include/linux | |
| parent | 3eb5b893ebec7325ac9e6b8e4864af89a9ca1ed1 (diff) | |
| parent | dbe7aa622db96b5cd601f59d09c4f00b98b76079 (diff) | |
Merge branch 'timers-2038-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull more 2038 timer work from Thomas Gleixner:
"Two more patches for the ongoing 2038 work:
- New accessors to clock MONOTONIC and REALTIME seconds
This is a seperate branch as Arnd has follow up work depending on
this"
* 'timers-2038-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
timekeeping: Provide y2038 safe accessor to the seconds portion of CLOCK_REALTIME
timekeeping: Provide fast accessor to the seconds part of CLOCK_MONOTONIC
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/timekeeper_internal.h | 2 | ||||
| -rw-r--r-- | include/linux/timekeeping.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h index 95640dcd1899..05af9a334893 100644 --- a/include/linux/timekeeper_internal.h +++ b/include/linux/timekeeper_internal.h | |||
| @@ -42,6 +42,7 @@ struct tk_read_base { | |||
| 42 | * struct timekeeper - Structure holding internal timekeeping values. | 42 | * struct timekeeper - Structure holding internal timekeeping values. |
| 43 | * @tkr: The readout base structure | 43 | * @tkr: The readout base structure |
| 44 | * @xtime_sec: Current CLOCK_REALTIME time in seconds | 44 | * @xtime_sec: Current CLOCK_REALTIME time in seconds |
| 45 | * @ktime_sec: Current CLOCK_MONOTONIC time in seconds | ||
| 45 | * @wall_to_monotonic: CLOCK_REALTIME to CLOCK_MONOTONIC offset | 46 | * @wall_to_monotonic: CLOCK_REALTIME to CLOCK_MONOTONIC offset |
| 46 | * @offs_real: Offset clock monotonic -> clock realtime | 47 | * @offs_real: Offset clock monotonic -> clock realtime |
| 47 | * @offs_boot: Offset clock monotonic -> clock boottime | 48 | * @offs_boot: Offset clock monotonic -> clock boottime |
| @@ -77,6 +78,7 @@ struct tk_read_base { | |||
| 77 | struct timekeeper { | 78 | struct timekeeper { |
| 78 | struct tk_read_base tkr; | 79 | struct tk_read_base tkr; |
| 79 | u64 xtime_sec; | 80 | u64 xtime_sec; |
| 81 | unsigned long ktime_sec; | ||
| 80 | struct timespec64 wall_to_monotonic; | 82 | struct timespec64 wall_to_monotonic; |
| 81 | ktime_t offs_real; | 83 | ktime_t offs_real; |
| 82 | ktime_t offs_boot; | 84 | ktime_t offs_boot; |
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index 961fea373f83..9b63d13ba82b 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h | |||
| @@ -28,6 +28,8 @@ struct timespec __current_kernel_time(void); | |||
| 28 | struct timespec64 get_monotonic_coarse64(void); | 28 | struct timespec64 get_monotonic_coarse64(void); |
| 29 | extern void getrawmonotonic64(struct timespec64 *ts); | 29 | extern void getrawmonotonic64(struct timespec64 *ts); |
| 30 | extern void ktime_get_ts64(struct timespec64 *ts); | 30 | extern void ktime_get_ts64(struct timespec64 *ts); |
| 31 | extern time64_t ktime_get_seconds(void); | ||
| 32 | extern time64_t ktime_get_real_seconds(void); | ||
| 31 | 33 | ||
| 32 | extern int __getnstimeofday64(struct timespec64 *tv); | 34 | extern int __getnstimeofday64(struct timespec64 *tv); |
| 33 | extern void getnstimeofday64(struct timespec64 *tv); | 35 | extern void getnstimeofday64(struct timespec64 *tv); |
