compat_time.h 821 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_COMPAT_TIME_H
  3. #define _LINUX_COMPAT_TIME_H
  4. #include <linux/types.h>
  5. #include <linux/time64.h>
  6. typedef s32 compat_time_t;
  7. struct compat_timespec {
  8. compat_time_t tv_sec;
  9. s32 tv_nsec;
  10. };
  11. struct compat_timeval {
  12. compat_time_t tv_sec;
  13. s32 tv_usec;
  14. };
  15. struct compat_itimerspec {
  16. struct compat_timespec it_interval;
  17. struct compat_timespec it_value;
  18. };
  19. extern int compat_get_timespec64(struct timespec64 *, const void __user *);
  20. extern int compat_put_timespec64(const struct timespec64 *, void __user *);
  21. extern int get_compat_itimerspec64(struct itimerspec64 *its,
  22. const struct compat_itimerspec __user *uits);
  23. extern int put_compat_itimerspec64(const struct itimerspec64 *its,
  24. struct compat_itimerspec __user *uits);
  25. #endif /* _LINUX_COMPAT_TIME_H */