mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
time: Change posix clocks ops interfaces to use timespec64
struct timespec is not y2038 safe on 32 bit machines. The posix clocks apis use struct timespec directly and through struct itimerspec. Replace the posix clock interfaces to use struct timespec64 and struct itimerspec64 instead. Also fix up their implementations accordingly. Note that the clock_getres() interface has also been changed to use timespec64 even though this particular interface is not affected by the y2038 problem. This helps verification for internal kernel code for y2038 readiness by getting rid of time_t/ timeval/ timespec. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Cc: arnd@arndb.de Cc: y2038@lists.linaro.org Cc: netdev@vger.kernel.org Cc: Richard Cochran <richardcochran@gmail.com> Cc: john.stultz@linaro.org Link: http://lkml.kernel.org/r/1490555058-4603-3-git-send-email-deepa.kernel@gmail.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
2ac00f17b2
commit
d340266e19
3 changed files with 36 additions and 26 deletions
|
@ -59,23 +59,23 @@ struct posix_clock_operations {
|
|||
|
||||
int (*clock_adjtime)(struct posix_clock *pc, struct timex *tx);
|
||||
|
||||
int (*clock_gettime)(struct posix_clock *pc, struct timespec *ts);
|
||||
int (*clock_gettime)(struct posix_clock *pc, struct timespec64 *ts);
|
||||
|
||||
int (*clock_getres) (struct posix_clock *pc, struct timespec *ts);
|
||||
int (*clock_getres) (struct posix_clock *pc, struct timespec64 *ts);
|
||||
|
||||
int (*clock_settime)(struct posix_clock *pc,
|
||||
const struct timespec *ts);
|
||||
const struct timespec64 *ts);
|
||||
|
||||
int (*timer_create) (struct posix_clock *pc, struct k_itimer *kit);
|
||||
|
||||
int (*timer_delete) (struct posix_clock *pc, struct k_itimer *kit);
|
||||
|
||||
void (*timer_gettime)(struct posix_clock *pc,
|
||||
struct k_itimer *kit, struct itimerspec *tsp);
|
||||
struct k_itimer *kit, struct itimerspec64 *tsp);
|
||||
|
||||
int (*timer_settime)(struct posix_clock *pc,
|
||||
struct k_itimer *kit, int flags,
|
||||
struct itimerspec *tsp, struct itimerspec *old);
|
||||
struct itimerspec64 *tsp, struct itimerspec64 *old);
|
||||
/*
|
||||
* Optional character device methods:
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue