Back to home page

OSCL-LXR

 
 

    


0001 #ifndef _LINUX_TIME32_H
0002 #define _LINUX_TIME32_H
0003 /*
0004  * These are all interfaces based on the old time_t definition
0005  * that overflows in 2038 on 32-bit architectures. New code
0006  * should use the replacements based on time64_t and timespec64.
0007  *
0008  * Any interfaces in here that become unused as we migrate
0009  * code to time64_t should get removed.
0010  */
0011 
0012 #include <linux/time64.h>
0013 #include <linux/timex.h>
0014 
0015 #include <vdso/time32.h>
0016 
0017 struct old_itimerspec32 {
0018     struct old_timespec32 it_interval;
0019     struct old_timespec32 it_value;
0020 };
0021 
0022 struct old_utimbuf32 {
0023     old_time32_t    actime;
0024     old_time32_t    modtime;
0025 };
0026 
0027 struct old_timex32 {
0028     u32 modes;
0029     s32 offset;
0030     s32 freq;
0031     s32 maxerror;
0032     s32 esterror;
0033     s32 status;
0034     s32 constant;
0035     s32 precision;
0036     s32 tolerance;
0037     struct old_timeval32 time;
0038     s32 tick;
0039     s32 ppsfreq;
0040     s32 jitter;
0041     s32 shift;
0042     s32 stabil;
0043     s32 jitcnt;
0044     s32 calcnt;
0045     s32 errcnt;
0046     s32 stbcnt;
0047     s32 tai;
0048 
0049     s32:32; s32:32; s32:32; s32:32;
0050     s32:32; s32:32; s32:32; s32:32;
0051     s32:32; s32:32; s32:32;
0052 };
0053 
0054 extern int get_old_timespec32(struct timespec64 *, const void __user *);
0055 extern int put_old_timespec32(const struct timespec64 *, void __user *);
0056 extern int get_old_itimerspec32(struct itimerspec64 *its,
0057             const struct old_itimerspec32 __user *uits);
0058 extern int put_old_itimerspec32(const struct itimerspec64 *its,
0059             struct old_itimerspec32 __user *uits);
0060 struct __kernel_timex;
0061 int get_old_timex32(struct __kernel_timex *, const struct old_timex32 __user *);
0062 int put_old_timex32(struct old_timex32 __user *, const struct __kernel_timex *);
0063 
0064 /**
0065  * ns_to_kernel_old_timeval - Convert nanoseconds to timeval
0066  * @nsec:   the nanoseconds value to be converted
0067  *
0068  * Returns the timeval representation of the nsec parameter.
0069  */
0070 extern struct __kernel_old_timeval ns_to_kernel_old_timeval(s64 nsec);
0071 
0072 #endif