Home
last modified time | relevance | path

Searched refs:clockid (Results 1 – 25 of 63) sorted by relevance

123

/kernel/linux/linux-5.10/tools/testing/selftests/timers/
Dnsleep-lat.c50 char *clockstring(int clockid) in clockstring() argument
52 switch (clockid) { in clockstring()
98 int nanosleep_lat_test(int clockid, long long ns) in nanosleep_lat_test() argument
107 if (clock_gettime(clockid, &start)) in nanosleep_lat_test()
109 if (clock_nanosleep(clockid, 0, &target, NULL)) in nanosleep_lat_test()
115 clock_gettime(clockid, &start); in nanosleep_lat_test()
117 clock_nanosleep(clockid, 0, &target, NULL); in nanosleep_lat_test()
118 clock_gettime(clockid, &end); in nanosleep_lat_test()
127 clock_gettime(clockid, &start); in nanosleep_lat_test()
129 clock_nanosleep(clockid, TIMER_ABSTIME, &target, NULL); in nanosleep_lat_test()
[all …]
Dnanosleep.c50 char *clockstring(int clockid) in clockstring() argument
52 switch (clockid) { in clockstring()
101 int nanosleep_test(int clockid, long long ns) in nanosleep_test() argument
106 if (clock_gettime(clockid, &now)) in nanosleep_test()
110 if (clock_nanosleep(clockid, TIMER_ABSTIME, &target, NULL)) in nanosleep_test()
112 clock_gettime(clockid, &now); in nanosleep_test()
118 clock_gettime(clockid, &now); in nanosleep_test()
123 clock_nanosleep(clockid, 0, &rel, NULL); in nanosleep_test()
124 clock_gettime(clockid, &now); in nanosleep_test()
134 int clockid, ret; in main() local
[all …]
Dinconsistency-check.c50 char *clockstring(int clockid) in clockstring() argument
52 switch (clockid) { in clockstring()
155 int clockid, opt; in main() local
181 for (clockid = userclock; clockid < maxclocks; clockid++) { in main()
183 if (clockid == CLOCK_HWSPECIFIC) in main()
186 if (!clock_gettime(clockid, &ts)) { in main()
187 printf("Consistent %-30s ", clockstring(clockid)); in main()
188 if (consistency_test(clockid, runtime)) in main()
Dalarmtimer-suspend.c57 char *clockstring(int clockid) in clockstring() argument
59 switch (clockid) { in clockstring()
Dset-timer-lat.c58 char *clockstring(int clockid) in clockstring() argument
60 switch (clockid) { in clockstring()
/kernel/liteos_a/testsuites/unittest/libc/time/clock/full/
Dclock_test_003.cpp35 clockid_t clockid; in ClockTest() local
43 ret = clock_getcpuclockid(1, &clockid); in ClockTest()
45 ICUNIT_ASSERT_EQUAL(clockid, CLOCK_GET_CPU_CLOCKID(pid), clockid); in ClockTest()
48 ret = clock_gettime(clockid, &ts); in ClockTest()
54 ret = clock_getcpuclockid(2, &clockid); in ClockTest()
56 ICUNIT_ASSERT_EQUAL(clockid, CLOCK_GET_CPU_CLOCKID(pid), clockid); in ClockTest()
59 ret = clock_gettime(clockid, &ts); in ClockTest()
65 ret = clock_getcpuclockid(getpid(), &clockid); in ClockTest()
67 ICUNIT_ASSERT_EQUAL(clockid, CLOCK_GET_CPU_CLOCKID(pid), clockid); in ClockTest()
70 ret = clock_gettime(clockid, &ts); in ClockTest()
Dclock_test_002.cpp57 clockid_t clockid; in ClockTest() local
71 ret = pthread_getcpuclockid(pthread_self(), &clockid); in ClockTest()
74 ret = ThreadClock("Main thread CPU time: ", clockid); in ClockTest()
78 ret = pthread_getcpuclockid(thread, &clockid); in ClockTest()
81 ret = ThreadClock("Subthread CPU time: ", clockid); in ClockTest()
Dclock_test_005.cpp35 clockid_t clockid; in ClockTest() local
41 ret = clock_getcpuclockid(pid, &clockid); in ClockTest()
45 ret = clock_getcpuclockid(pid, &clockid); in ClockTest()
Dclock_test_004.cpp36 clockid_t clockid; in ClockTest() local
/kernel/linux/linux-5.10/tools/testing/selftests/timens/
Dtimerfd.c18 static int tclock_gettime(clock_t clockid, struct timespec *now) in tclock_gettime() argument
20 if (clockid == CLOCK_BOOTTIME_ALARM) in tclock_gettime()
21 clockid = CLOCK_BOOTTIME; in tclock_gettime()
22 return clock_gettime(clockid, now); in tclock_gettime()
25 int run_test(int clockid, struct timespec now) in run_test() argument
31 if (check_skip(clockid)) in run_test()
34 if (tclock_gettime(clockid, &now)) in run_test()
35 return pr_perror("clock_gettime(%d)", clockid); in run_test()
50 fd = timerfd_create(clockid, 0); in run_test()
52 return pr_perror("timerfd_create(%d)", clockid); in run_test()
[all …]
Dclock_nanosleep.c28 int clockid; member
36 clock_nanosleep(args->clockid, args->abs ? TIMER_ABSTIME : 0, args->now, args->rem); in call_nanosleep()
41 int run_test(int clockid, int abs) in run_test() argument
44 struct thread_args args = { .now = &now, .rem = &rem, .clockid = clockid}; in run_test()
56 if (clock_gettime(clockid, &start) == -1) { in run_test()
57 if (errno == EINVAL && check_skip(clockid)) in run_test()
100 ksft_test_result_pass("clockid: %d abs:%d timeout\n", clockid, abs); in run_test()
106 clockid, abs, rem.tv_sec); in run_test()
109 ksft_test_result_pass("clockid: %d abs:%d\n", clockid, abs); in run_test()
Dfutex.c20 static int run_test(int clockid) in run_test() argument
26 if (clockid == CLOCK_REALTIME) in run_test()
29 clock_gettime(clockid, &timeout); in run_test()
48 clock_gettime(clockid, &end); in run_test()
57 ksft_test_result_pass("futex with the %d clockid\n", clockid); in run_test()
Dtimer.c18 int run_test(int clockid, struct timespec now) in run_test() argument
25 if (check_skip(clockid)) in run_test()
42 if (timer_create(clockid, &sevp, &fd) == -1) { in run_test()
61 clockid, elapsed); in run_test()
66 ksft_test_result_pass("clockid=%d\n", clockid); in run_test()
Dtimens.h30 static inline bool check_skip(int clockid) in check_skip() argument
32 if (!config_alarm_timers && clockid == CLOCK_BOOTTIME_ALARM) { in check_skip()
40 switch (clockid) { in check_skip()
Dgettime_perf.c39 static void test(clock_t clockid, char *clockstr, bool in_ns) in test() argument
45 vdso_clock_gettime(clockid, &start); in test()
50 vdso_clock_gettime(clockid, &tp); in test()
/kernel/linux/linux-5.10/tools/perf/util/
Dclockid.c14 int clockid; member
18 { .name = n, .clockid = (c), }
90 if (sscanf(str, "%d", &opts->clockid) == 1) in parse_clockid()
91 return get_clockid_res(opts->clockid, &opts->clockid_res_ns); in parse_clockid()
99 opts->clockid = cm->clockid; in parse_clockid()
100 return get_clockid_res(opts->clockid, in parse_clockid()
115 if (cm->clockid == clk_id) in clockid_name()
/kernel/linux/linux-5.10/fs/
Dtimerfd.c40 int clockid; member
54 return ctx->clockid == CLOCK_REALTIME_ALARM || in isalarm()
55 ctx->clockid == CLOCK_BOOTTIME_ALARM; in isalarm()
146 if ((ctx->clockid == CLOCK_REALTIME || in timerfd_setup_cancel()
147 ctx->clockid == CLOCK_REALTIME_ALARM) && in timerfd_setup_cancel()
178 int clockid = ctx->clockid; in timerfd_setup() local
190 ctx->clockid == CLOCK_REALTIME_ALARM ? in timerfd_setup()
194 hrtimer_init(&ctx->t.tmr, clockid, htmode); in timerfd_setup()
201 texp = timens_ktime_to_host(clockid, texp); in timerfd_setup()
321 ctx->clockid, in timerfd_show()
[all …]
/kernel/linux/linux-5.10/include/linux/
Dtime_namespace.h59 int clockid; member
80 ktime_t do_timens_ktime_to_host(clockid_t clockid, ktime_t tim,
83 static inline ktime_t timens_ktime_to_host(clockid_t clockid, ktime_t tim) in timens_ktime_to_host() argument
90 return do_timens_ktime_to_host(clockid, tim, &ns->offsets); in timens_ktime_to_host()
133 static inline ktime_t timens_ktime_to_host(clockid_t clockid, ktime_t tim) in timens_ktime_to_host() argument
Drestart_block.h39 clockid_t clockid; member
/kernel/linux/linux-5.10/net/sched/
Dsch_etf.c31 int clockid; member
57 if (qopt->clockid < 0) { in validate_input_params()
62 if (qopt->clockid != CLOCK_TAI) { in validate_input_params()
94 if (sk->sk_clockid != q->clockid) in is_packet_valid()
374 qopt->delta, qopt->clockid, in etf_init()
392 q->clockid = qopt->clockid; in etf_init()
397 switch (q->clockid) { in etf_init()
415 qdisc_watchdog_init_clockid(&q->watchdog, sch, q->clockid); in etf_init()
477 opt.clockid = q->clockid; in etf_dump()
Dact_gate.c276 enum tk_offsets tko, s32 clockid, in gate_setup_timer() argument
282 clockid == gact->param.tcfg_clockid) in gate_setup_timer()
290 gact->param.tcfg_clockid = clockid; in gate_setup_timer()
292 hrtimer_init(&gact->hitimer, clockid, HRTIMER_MODE_ABS_SOFT); in gate_setup_timer()
308 s32 clockid = CLOCK_TAI; in tcf_gate_init() local
328 clockid = nla_get_s32(tb[TCA_GATE_CLOCKID]); in tcf_gate_init()
329 switch (clockid) { in tcf_gate_init()
419 gate_setup_timer(gact, basetime, tk_offset, clockid, in tcf_gate_init()
Dsch_taprio.c67 int clockid; member
1347 int clockid = nla_get_s32(tb[TCA_TAPRIO_ATTR_SCHED_CLOCKID]); in taprio_parse_clockid() local
1353 if (clockid < 0 || in taprio_parse_clockid()
1354 (q->clockid != -1 && q->clockid != clockid)) { in taprio_parse_clockid()
1361 switch (clockid) { in taprio_parse_clockid()
1382 q->clockid = clockid; in taprio_parse_clockid()
1549 hrtimer_init(&q->advance_timer, q->clockid, HRTIMER_MODE_ABS); in taprio_change()
1684 q->clockid = -1; in taprio_init()
1863 nla_put_s32(skb, TCA_TAPRIO_ATTR_SCHED_CLOCKID, q->clockid)) in taprio_dump()
/kernel/linux/linux-5.10/include/trace/events/
Dtimer.h169 TP_PROTO(struct hrtimer *hrtimer, clockid_t clockid,
172 TP_ARGS(hrtimer, clockid, mode),
176 __field( clockid_t, clockid )
182 __entry->clockid = clockid;
187 decode_clockid(__entry->clockid),
/kernel/linux/linux-5.10/kernel/time/
Dnamespace.c23 ktime_t do_timens_ktime_to_host(clockid_t clockid, ktime_t tim, in do_timens_ktime_to_host() argument
28 switch (clockid) { in do_timens_ktime_to_host()
334 static void show_offset(struct seq_file *m, int clockid, struct timespec64 *ts) in show_offset() argument
338 switch (clockid) { in show_offset()
388 switch (off->clockid) { in proc_timens_set_offset()
427 switch (off->clockid) { in proc_timens_set_offset()
Dhrtimer.c75 .clockid = CLOCK_MONOTONIC,
80 .clockid = CLOCK_REALTIME,
85 .clockid = CLOCK_BOOTTIME,
90 .clockid = CLOCK_TAI,
95 .clockid = CLOCK_MONOTONIC,
100 .clockid = CLOCK_REALTIME,
105 .clockid = CLOCK_BOOTTIME,
110 .clockid = CLOCK_TAI,
465 debug_init(struct hrtimer *timer, clockid_t clockid, in debug_init() argument
469 trace_hrtimer_init(timer, clockid, mode); in debug_init()
[all …]

123