Deepa Dinamani | 0d55303 | 2018-03-13 21:03:25 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef _LINUX_COMPAT_TIME_H |
| 3 | #define _LINUX_COMPAT_TIME_H |
| 4 | |
| 5 | #include <linux/types.h> |
Deepa Dinamani | 1c68adf | 2018-03-13 21:03:26 -0700 | [diff] [blame] | 6 | #include <linux/time64.h> |
Deepa Dinamani | 0d55303 | 2018-03-13 21:03:25 -0700 | [diff] [blame] | 7 | |
| 8 | typedef s32 compat_time_t; |
| 9 | |
| 10 | struct compat_timespec { |
| 11 | compat_time_t tv_sec; |
| 12 | s32 tv_nsec; |
| 13 | }; |
| 14 | |
| 15 | struct compat_timeval { |
| 16 | compat_time_t tv_sec; |
| 17 | s32 tv_usec; |
| 18 | }; |
| 19 | |
Deepa Dinamani | afef05c | 2018-06-16 22:11:43 -0700 | [diff] [blame] | 20 | struct compat_itimerspec { |
| 21 | struct compat_timespec it_interval; |
| 22 | struct compat_timespec it_value; |
| 23 | }; |
| 24 | |
Deepa Dinamani | 1c68adf | 2018-03-13 21:03:26 -0700 | [diff] [blame] | 25 | extern int compat_get_timespec64(struct timespec64 *, const void __user *); |
| 26 | extern int compat_put_timespec64(const struct timespec64 *, void __user *); |
Deepa Dinamani | afef05c | 2018-06-16 22:11:43 -0700 | [diff] [blame] | 27 | extern int get_compat_itimerspec64(struct itimerspec64 *its, |
| 28 | const struct compat_itimerspec __user *uits); |
| 29 | extern int put_compat_itimerspec64(const struct itimerspec64 *its, |
| 30 | struct compat_itimerspec __user *uits); |
Deepa Dinamani | 1c68adf | 2018-03-13 21:03:26 -0700 | [diff] [blame] | 31 | |
Deepa Dinamani | 0d55303 | 2018-03-13 21:03:25 -0700 | [diff] [blame] | 32 | #endif /* _LINUX_COMPAT_TIME_H */ |