Lines Matching refs:ts

144 		struct timespec64 ts;
146 ktime_get_real_ts64(&ts);
147 if (put_user(ts.tv_sec, &tv->tv_sec) ||
148 put_user(ts.tv_nsec / 1000, &tv->tv_usec))
228 struct timespec64 ts;
230 ktime_get_real_ts64(&ts);
231 if (put_user(ts.tv_sec, &tv->tv_sec) ||
232 put_user(ts.tv_nsec / 1000, &tv->tv_usec))
472 struct timespec64 ts = ns_to_timespec64(nsec);
475 tv.tv_sec = ts.tv_sec;
476 tv.tv_usec = (suseconds_t)ts.tv_nsec / 1000;
485 * @ts: pointer to timespec variable to be set
495 void set_normalized_timespec64(struct timespec64 *ts, time64_t sec, s64 nsec)
512 ts->tv_sec = sec;
513 ts->tv_nsec = nsec;
525 struct timespec64 ts = { 0, 0 };
529 ts.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem);
530 ts.tv_nsec = rem;
537 ts.tv_sec = -div_u64_rem(-nsec - 1, NSEC_PER_SEC, &rem) - 1;
538 ts.tv_nsec = NSEC_PER_SEC - rem - 1;
541 return ts;
864 * @ts: destination &struct timespec64
871 int get_timespec64(struct timespec64 *ts,
881 ts->tv_sec = kts.tv_sec;
888 ts->tv_nsec = kts.tv_nsec;
897 * @ts: input &struct timespec64
902 int put_timespec64(const struct timespec64 *ts,
906 .tv_sec = ts->tv_sec,
907 .tv_nsec = ts->tv_nsec
917 struct old_timespec32 ts;
920 ret = copy_from_user(&ts, cts, sizeof(ts));
924 ts64->tv_sec = ts.tv_sec;
925 ts64->tv_nsec = ts.tv_nsec;
933 struct old_timespec32 ts = {
937 return copy_to_user(cts, &ts, sizeof(ts)) ? -EFAULT : 0;
942 * @ts: destination &struct timespec64
949 int get_old_timespec32(struct timespec64 *ts, const void __user *uts)
952 return copy_from_user(ts, uts, sizeof(*ts)) ? -EFAULT : 0;
954 return __get_old_timespec32(ts, uts);
961 * @ts: input &struct timespec64
968 int put_old_timespec32(const struct timespec64 *ts, void __user *uts)
971 return copy_to_user(uts, ts, sizeof(*ts)) ? -EFAULT : 0;
973 return __put_old_timespec32(ts, uts);