Lines Matching refs:ts
144 struct timespec64 ts; in SYSCALL_DEFINE2() local
146 ktime_get_real_ts64(&ts); in SYSCALL_DEFINE2()
147 if (put_user(ts.tv_sec, &tv->tv_sec) || in SYSCALL_DEFINE2()
148 put_user(ts.tv_nsec / 1000, &tv->tv_usec)) in SYSCALL_DEFINE2()
229 struct timespec64 ts; in COMPAT_SYSCALL_DEFINE2() local
231 ktime_get_real_ts64(&ts); in COMPAT_SYSCALL_DEFINE2()
232 if (put_user(ts.tv_sec, &tv->tv_sec) || in COMPAT_SYSCALL_DEFINE2()
233 put_user(ts.tv_nsec / 1000, &tv->tv_usec)) in COMPAT_SYSCALL_DEFINE2()
462 struct timespec ts; in ns_to_timespec() local
468 ts.tv_sec = div_s64_rem(nsec, NSEC_PER_SEC, &rem); in ns_to_timespec()
470 ts.tv_sec--; in ns_to_timespec()
473 ts.tv_nsec = rem; in ns_to_timespec()
475 return ts; in ns_to_timespec()
487 struct timespec ts = ns_to_timespec(nsec); in ns_to_timeval() local
490 tv.tv_sec = ts.tv_sec; in ns_to_timeval()
491 tv.tv_usec = (suseconds_t) ts.tv_nsec / 1000; in ns_to_timeval()
499 struct timespec64 ts = ns_to_timespec64(nsec); in ns_to_kernel_old_timeval() local
502 tv.tv_sec = ts.tv_sec; in ns_to_kernel_old_timeval()
503 tv.tv_usec = (suseconds_t)ts.tv_nsec / 1000; in ns_to_kernel_old_timeval()
523 void set_normalized_timespec64(struct timespec64 *ts, time64_t sec, s64 nsec) in set_normalized_timespec64() argument
540 ts->tv_sec = sec; in set_normalized_timespec64()
541 ts->tv_nsec = nsec; in set_normalized_timespec64()
553 struct timespec64 ts; in ns_to_timespec64() local
559 ts.tv_sec = div_s64_rem(nsec, NSEC_PER_SEC, &rem); in ns_to_timespec64()
561 ts.tv_sec--; in ns_to_timespec64()
564 ts.tv_nsec = rem; in ns_to_timespec64()
566 return ts; in ns_to_timespec64()
872 int get_timespec64(struct timespec64 *ts, in get_timespec64() argument
882 ts->tv_sec = kts.tv_sec; in get_timespec64()
889 ts->tv_nsec = kts.tv_nsec; in get_timespec64()
895 int put_timespec64(const struct timespec64 *ts, in put_timespec64() argument
899 .tv_sec = ts->tv_sec, in put_timespec64()
900 .tv_nsec = ts->tv_nsec in put_timespec64()
910 struct old_timespec32 ts; in __get_old_timespec32() local
913 ret = copy_from_user(&ts, cts, sizeof(ts)); in __get_old_timespec32()
917 ts64->tv_sec = ts.tv_sec; in __get_old_timespec32()
918 ts64->tv_nsec = ts.tv_nsec; in __get_old_timespec32()
926 struct old_timespec32 ts = { in __put_old_timespec32() local
930 return copy_to_user(cts, &ts, sizeof(ts)) ? -EFAULT : 0; in __put_old_timespec32()
933 int get_old_timespec32(struct timespec64 *ts, const void __user *uts) in get_old_timespec32() argument
936 return copy_from_user(ts, uts, sizeof(*ts)) ? -EFAULT : 0; in get_old_timespec32()
938 return __get_old_timespec32(ts, uts); in get_old_timespec32()
942 int put_old_timespec32(const struct timespec64 *ts, void __user *uts) in put_old_timespec32() argument
945 return copy_to_user(uts, ts, sizeof(*ts)) ? -EFAULT : 0; in put_old_timespec32()
947 return __put_old_timespec32(ts, uts); in put_old_timespec32()