mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 20:02:17 +00:00
![Arnd Bergmann](/assets/img/avatar_default.png)
Take the renaming of timeval and timespec one level further, also renaming itimerval to __kernel_old_itimerval, to avoid namespace conflicts with the user-space structure that may use 64-bit time_t members. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
46 lines
1.3 KiB
C
46 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
#ifndef _UAPI_LINUX_TIME_TYPES_H
|
|
#define _UAPI_LINUX_TIME_TYPES_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct __kernel_timespec {
|
|
__kernel_time64_t tv_sec; /* seconds */
|
|
long long tv_nsec; /* nanoseconds */
|
|
};
|
|
|
|
struct __kernel_itimerspec {
|
|
struct __kernel_timespec it_interval; /* timer period */
|
|
struct __kernel_timespec it_value; /* timer expiration */
|
|
};
|
|
|
|
/*
|
|
* legacy timeval structure, only embedded in structures that
|
|
* traditionally used 'timeval' to pass time intervals (not absolute
|
|
* times). Do not add new users. If user space fails to compile
|
|
* here, this is probably because it is not y2038 safe and needs to
|
|
* be changed to use another interface.
|
|
*/
|
|
#ifndef __kernel_old_timeval
|
|
struct __kernel_old_timeval {
|
|
__kernel_long_t tv_sec;
|
|
__kernel_long_t tv_usec;
|
|
};
|
|
#endif
|
|
|
|
struct __kernel_old_timespec {
|
|
__kernel_old_time_t tv_sec; /* seconds */
|
|
long tv_nsec; /* nanoseconds */
|
|
};
|
|
|
|
struct __kernel_old_itimerval {
|
|
struct __kernel_old_timeval it_interval;/* timer interval */
|
|
struct __kernel_old_timeval it_value; /* current value */
|
|
};
|
|
|
|
struct __kernel_sock_timeval {
|
|
__s64 tv_sec;
|
|
__s64 tv_usec;
|
|
};
|
|
|
|
#endif /* _UAPI_LINUX_TIME_TYPES_H */
|