summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2017-03-26 12:04:14 -0700
committerThomas Gleixner <tglx@linutronix.de>2017-04-14 21:49:55 +0200
commit3c9c12f4b4610dba864038c7822b427816f5893c (patch)
tree0590f7b302a3984bfa7169b119dcc81c85731066 /include
parentd340266e19ddb70dbd608f9deedcfb35fdb9d419 (diff)
time: Change k_clock clock_get() to use timespec64
struct timespec is not y2038 safe on 32 bit machines. Replace uses of struct timespec with struct timespec64 in the kernel. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Cc: y2038@lists.linaro.org Cc: john.stultz@linaro.org Cc: arnd@arndb.de Link: http://lkml.kernel.org/r/1490555058-4603-4-git-send-email-deepa.kernel@gmail.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/posix-timers.h2
-rw-r--r--include/linux/timekeeping.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
index 64aa189efe21..0688f3975da7 100644
--- a/include/linux/posix-timers.h
+++ b/include/linux/posix-timers.h
@@ -90,7 +90,7 @@ struct k_clock {
int (*clock_getres) (const clockid_t which_clock, struct timespec *tp);
int (*clock_set) (const clockid_t which_clock,
const struct timespec *tp);
- int (*clock_get) (const clockid_t which_clock, struct timespec * tp);
+ int (*clock_get) (const clockid_t which_clock, struct timespec64 *tp);
int (*clock_adj) (const clockid_t which_clock, struct timex *tx);
int (*timer_create) (struct k_itimer *timer);
int (*nsleep) (const clockid_t which_clock, int flags,
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index 3617a78897bb..ddc229ff6d1e 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -258,6 +258,11 @@ static inline void timekeeping_clocktai(struct timespec *ts)
*ts = ktime_to_timespec(ktime_get_clocktai());
}
+static inline void timekeeping_clocktai64(struct timespec64 *ts)
+{
+ *ts = ktime_to_timespec64(ktime_get_clocktai());
+}
+
/*
* RTC specific
*/