Home
last modified time | relevance | path

Searched refs:timespec (Results 1 – 25 of 283) sorted by relevance

12345678910>>...12

/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/
Dtest_util.c57 int64_t timespec_to_ns(struct timespec ts) in timespec_to_ns()
62 struct timespec timespec_add_ns(struct timespec ts, int64_t ns) in timespec_add_ns()
64 struct timespec res; in timespec_add_ns()
73 struct timespec timespec_add(struct timespec ts1, struct timespec ts2) in timespec_add()
77 return timespec_add_ns((struct timespec){0}, ns1 + ns2); in timespec_add()
80 struct timespec timespec_sub(struct timespec ts1, struct timespec ts2) in timespec_sub()
84 return timespec_add_ns((struct timespec){0}, ns1 - ns2); in timespec_sub()
87 struct timespec timespec_diff_now(struct timespec start) in timespec_diff_now()
89 struct timespec end; in timespec_diff_now()
95 struct timespec timespec_div(struct timespec ts, int divisor) in timespec_div()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/include/
Dtest_util.h63 int64_t timespec_to_ns(struct timespec ts);
64 struct timespec timespec_add_ns(struct timespec ts, int64_t ns);
65 struct timespec timespec_add(struct timespec ts1, struct timespec ts2);
66 struct timespec timespec_sub(struct timespec ts1, struct timespec ts2);
67 struct timespec timespec_diff_now(struct timespec start);
68 struct timespec timespec_div(struct timespec ts, int divisor);
/kernel/liteos_a/syscall/
Dtime_syscall.c263 int SysClockSettime(clockid_t clockID, const struct timespec *tp) in SysClockSettime()
266 struct timespec stp; in SysClockSettime()
273 if (LOS_ArchCopyFromUser(&stp, tp, sizeof(struct timespec))) { in SysClockSettime()
285 int SysClockGettime(clockid_t clockID, struct timespec *tp) in SysClockGettime()
288 struct timespec stp = { 0 }; in SysClockGettime()
300 if (LOS_ArchCopyToUser(tp, &stp, sizeof(struct timespec))) { in SysClockGettime()
308 int SysClockGetres(clockid_t clockID, struct timespec *tp) in SysClockGetres()
311 struct timespec stp = { 0 }; in SysClockGetres()
323 if (LOS_ArchCopyToUser(tp, &stp, sizeof(struct timespec))) { in SysClockGetres()
331 int SysClockNanoSleep(clockid_t clk, int flags, const struct timespec *req, struct timespec *rem) in SysClockNanoSleep()
[all …]
Dipc_syscall.c157 const struct timespec *absTimeout) in SysMqTimedSend()
160 struct timespec timeout; in SysMqTimedSend()
164 ret = LOS_ArchCopyFromUser(&timeout, absTimeout, sizeof(struct timespec)); in SysMqTimedSend()
191 const struct timespec *absTimeout) in SysMqTimedReceive()
194 struct timespec timeout; in SysMqTimedReceive()
199 ret = LOS_ArchCopyFromUser(&timeout, absTimeout, sizeof(struct timespec)); in SysMqTimedReceive()
261 int SysSigTimedWait(const sigset_t_l *setl, siginfo_t *info, const struct timespec *timeout, size_t… in SysSigTimedWait()
267 struct timespec timeoutIntr; in SysSigTimedWait()
277 retVal = LOS_ArchCopyFromUser(&timeoutIntr, timeout, sizeof(struct timespec)); in SysSigTimedWait()
Dlos_syscall.h82 extern int SysSchedRRGetInterval(int pid, struct timespec *tp);
129 const struct timespec *absTimeout);
131 const struct timespec *absTimeout);
140 const struct timespec *timeout, size_t sigsetsize);
189 extern int SysNanoSleep(const struct timespec *rqtp, struct timespec *rmtp);
198 extern int SysClockSettime(clockid_t clockID, const struct timespec *tp);
199 extern int SysClockGettime(clockid_t clockID, struct timespec *tp);
200 extern int SysClockGetres(clockid_t clockID, struct timespec *tp);
201 extern int SysClockNanoSleep(clockid_t clk, int flags, const struct timespec *req, struct timespec
243 extern int SysUtimensat(int fd, const char *path, struct timespec times[2], int flag);
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/timers/
Draw_skew.c46 unsigned long long ts_to_nsec(struct timespec ts) in ts_to_nsec()
51 struct timespec nsec_to_ts(long long ns) in nsec_to_ts()
53 struct timespec ts; in nsec_to_ts()
60 long long diff_timespec(struct timespec start, struct timespec end) in diff_timespec()
69 void get_monotonic_and_raw(struct timespec *mon, struct timespec *raw) in get_monotonic_and_raw()
71 struct timespec start, mid, end; in get_monotonic_and_raw()
94 struct timespec mon, raw, start, end; in main()
Dadjtick.c44 unsigned long long ts_to_nsec(struct timespec ts) in ts_to_nsec()
49 struct timespec nsec_to_ts(long long ns) in nsec_to_ts()
51 struct timespec ts; in nsec_to_ts()
59 long long diff_timespec(struct timespec start, struct timespec end) in diff_timespec()
69 void get_monotonic_and_raw(struct timespec *mon, struct timespec *raw) in get_monotonic_and_raw()
71 struct timespec start, mid, end; in get_monotonic_and_raw()
98 struct timespec mon_start, raw_start, mon_end, raw_end; in get_ppm_drift()
170 struct timespec raw; in main()
Dmqueue-lat.c40 long long timespec_sub(struct timespec a, struct timespec b) in timespec_sub()
48 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add()
63 struct timespec start, end, now, target; in mqueue_lat_test()
Dnanosleep.c80 static inline int in_order(struct timespec a, struct timespec b) in in_order()
91 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add()
103 struct timespec now, target, rel; in nanosleep_test()
Dleap-a-day.c60 static inline int in_order(struct timespec a, struct timespec b) in in_order()
71 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add()
162 struct timespec now, target; in test_hrtimer_failure()
213 struct timespec ts; in main()
238 struct timespec ts; in main()
331 struct timespec tai; in main()
Dnsleep-lat.c79 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add()
90 long long timespec_sub(struct timespec a, struct timespec b) in timespec_sub()
100 struct timespec start, end, target; in nanosleep_lat_test()
Dalarmtimer-suspend.c54 struct timespec start_time;
87 long long timespec_sub(struct timespec a, struct timespec b) in timespec_sub()
100 struct timespec ts; in sigalarm()
/kernel/liteos_m/testsuites/unittest/posix/src/semaphore/
Dsemaphore_func_test.c72 struct timespec GetDelayedTime(unsigned int ms) in GetDelayedTime()
75 struct timespec ts = { 0 }; in GetDelayedTime()
79 struct timespec tsNow = { 0 }; in GetDelayedTime()
88 int GetTimeDiff(struct timespec ts1, struct timespec ts2) in GetTimeDiff()
105 struct timespec ts = { 0 };
106 struct timespec tsNow = { 0 };
136 struct timespec ts = { 0 };
137 struct timespec tsNow = { 0 };
138 struct timespec tsBegin = { 0 };
179 struct timespec ts;
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/
Ddirty_log_perf_test.c40 struct timespec start; in vcpu_worker()
41 struct timespec ts_diff; in vcpu_worker()
42 struct timespec total = (struct timespec){0}; in vcpu_worker()
43 struct timespec avg; in vcpu_worker()
104 struct timespec start; in run_test()
105 struct timespec ts_diff; in run_test()
106 struct timespec get_dirty_log_total = (struct timespec){0}; in run_test()
107 struct timespec vcpu_dirty_total = (struct timespec){0}; in run_test()
108 struct timespec avg; in run_test()
111 struct timespec clear_dirty_log_total = (struct timespec){0}; in run_test()
/kernel/liteos_m/kal/posix/src/
Dtime_internal.h80 STATIC INLINE BOOL ValidTimeSpec(const struct timespec *tp) in ValidTimeSpec()
95 STATIC INLINE UINT32 OsTimeSpec2Tick(const struct timespec *tp) in OsTimeSpec2Tick()
108 STATIC INLINE VOID OsTick2TimeSpec(struct timespec *tp, UINT32 tick) in OsTick2TimeSpec()
115 STATIC INLINE INT32 OsGetTickTimeFromNow(const struct timespec *ts, clockid_t clockId, UINT64 *absT… in OsGetTickTimeFromNow()
117 struct timespec tp; in OsGetTickTimeFromNow()
Dtime.c51 STATIC struct timespec g_accDeltaFromSet;
94 int nanosleep(const struct timespec *rqtp, struct timespec *rmtp) in nanosleep()
278 STATIC VOID OsGetHwTime(struct timespec *hwTime) in OsGetHwTime()
288 STATIC VOID OsGetRealTime(struct timespec *realTime) in OsGetRealTime()
291 struct timespec hwTime = {0}; in OsGetRealTime()
300 STATIC VOID OsSetRealTime(const struct timespec *realTime) in OsSetRealTime()
303 struct timespec hwTime = {0}; in OsSetRealTime()
312 int clock_settime(clockid_t clockID, const struct timespec *tp) in clock_settime()
351 int clock_gettime(clockid_t clockID, struct timespec *tp) in clock_gettime()
391 int clock_getres(clockid_t clockID, struct timespec *tp) in clock_getres()
[all …]
/kernel/linux/linux-5.10/arch/um/os-Linux/
Dtime.c26 static inline long long timespec_to_ns(const struct timespec *ts) in timespec_to_ns()
33 struct timespec realtime_tp; in os_persistent_clock_emulation()
95 struct timespec ts; in os_nsecs()
107 struct timespec ts = { in os_idle_sleep()
/kernel/liteos_a/testsuites/unittest/process/basic/pthread/smoke/
Dpthread_atfork_test_002.cpp34 extern int nanosleep(const struct timespec *req, struct timespec *rem);
44 struct timespec ts = { 2, 0 }; // 2, set time 2s. in Doit()
62 struct timespec ts = { 2, 0 }; // 2, set time 2s. in Doit1()
98 struct timespec ts = { 1, 0 }; in PthreadAtforkTest()
/kernel/linux/linux-5.10/include/uapi/linux/
Dtime.h11 struct timespec { struct
23 struct timespec it_interval;/* timer period */ argument
24 struct timespec it_value; /* timer expiration */
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/linux/
Dtime.h25 struct timespec { struct
35 struct timespec it_interval; argument
36 struct timespec it_value;
/kernel/liteos_a/testsuites/unittest/container/smoke/
DIt_time_container_005.cpp39 struct timespec tp = *((struct timespec *)arg); in childFunc()
40 struct timespec tp1 = {0}; in childFunc()
88 struct timespec tp = {0}; in TimeContainerUnshare()
DIt_time_container_004.cpp39 struct timespec tp = *((struct timespec *)arg); in childFunc()
40 struct timespec tp1; in childFunc()
88 struct timespec tp; in TimeContainerUnshare()
/kernel/liteos_m/testsuites/unittest/xts/time/
Dsleep_test.c69 struct timespec req = {0, 100}; /* 100, common data for test, no special meaning */
70 struct timespec rem = {0};
85 struct timespec req = {0, 100}; /* 100, common data for test, no special meaning */
86 struct timespec rem = {0};
/kernel/linux/patches/linux-4.19/prebuilts/usr/include/linux/
Dtime.h11 struct timespec { struct
28 struct timespec it_interval; argument
29 struct timespec it_value;
/kernel/liteos_a/compat/posix/include/
Dtime_posix.h53 STATIC INLINE BOOL ValidTimeSpec(const struct timespec *tp) in ValidTimeSpec()
68 STATIC INLINE UINT32 OsTimeSpec2Tick(const struct timespec *tp) in OsTimeSpec2Tick()
81 STATIC INLINE VOID OsTick2TimeSpec(struct timespec *tp, UINT32 tick) in OsTick2TimeSpec()

12345678910>>...12