| /linux/tools/testing/selftests/timers/ |
| H A D | nanosleep.c | 38 char *clockstring(int clockid) in clockstring() argument 40 switch (clockid) { in clockstring() 89 int nanosleep_test(int clockid, long long ns) in nanosleep_test() argument 94 if (clock_gettime(clockid, &now)) in nanosleep_test() 98 if (clock_nanosleep(clockid, TIMER_ABSTIME, &target, NULL)) in nanosleep_test() 100 clock_gettime(clockid, &now); in nanosleep_test() 106 clock_gettime(clockid, &now); in nanosleep_test() 111 clock_nanosleep(clockid, 0, &rel, NULL); in nanosleep_test() 112 clock_gettime(clockid, &now); in nanosleep_test() 122 int clockid, ret; in main() local [all …]
|
| H A D | nsleep-lat.c | 37 char *clockstring(int clockid) in clockstring() argument 39 switch (clockid) { in clockstring() 85 int nanosleep_lat_test(int clockid, long long ns) in nanosleep_lat_test() argument 94 if (clock_gettime(clockid, &start)) in nanosleep_lat_test() 96 if (clock_nanosleep(clockid, 0, &target, NULL)) in nanosleep_lat_test() 102 clock_gettime(clockid, &start); in nanosleep_lat_test() 104 clock_nanosleep(clockid, 0, &target, NULL); in nanosleep_lat_test() 105 clock_gettime(clockid, &end); in nanosleep_lat_test() 114 clock_gettime(clockid, &start); in nanosleep_lat_test() 116 clock_nanosleep(clockid, TIMER_ABSTIME, &target, NULL); in nanosleep_lat_test() [all …]
|
| H A D | inconsistency-check.c | 39 char *clockstring(int clockid) in clockstring() argument 41 switch (clockid) { in clockstring() 142 int clockid, opt; in main() local 171 for (clockid = userclock; clockid < maxclocks; clockid++) { in main() 173 if (clockid == CLOCK_HWSPECIFIC || clock_gettime(clockid, &ts)) { in main() 174 ksft_test_result_skip("%-31s\n", clockstring(clockid)); in main() 178 if (consistency_test(clockid, runtime)) { in main() 179 ksft_test_result_fail("%-31s\n", clockstring(clockid)); in main() 182 ksft_test_result_pass("%-31s\n", clockstring(clockid)); in main()
|
| H A D | alarmtimer-suspend.c | 43 char *clockstring(int clockid) in clockstring() argument 45 switch (clockid) { in clockstring()
|
| /linux/tools/include/nolibc/ |
| H A D | time.h | 44 int sys_clock_getres(clockid_t clockid, struct timespec *res) in sys_clock_getres() argument 47 return my_syscall2(__NR_clock_getres, clockid, res); in sys_clock_getres() 52 ret = my_syscall2(__NR_clock_getres_time64, clockid, &kres); in sys_clock_getres() 60 int clock_getres(clockid_t clockid, struct timespec *res) in clock_getres() argument 62 return __sysret(sys_clock_getres(clockid, res)); in clock_getres() 66 int sys_clock_gettime(clockid_t clockid, struct timespec *tp) in sys_clock_gettime() argument 69 return my_syscall2(__NR_clock_gettime, clockid, tp); in sys_clock_gettime() 74 ret = my_syscall2(__NR_clock_gettime64, clockid, &ktp); in sys_clock_gettime() 82 int clock_gettime(clockid_t clockid, struct timespec *tp) in clock_gettime() argument 84 return __sysret(sys_clock_gettime(clockid, tp)); in clock_gettime() [all …]
|
| /linux/tools/testing/selftests/timens/ |
| H A D | timerfd.c | 18 static int tclock_gettime(clockid_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 static 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 …]
|
| H A D | clock_nanosleep.c | 28 int clockid; member 36 clock_nanosleep(args->clockid, args->abs ? TIMER_ABSTIME : 0, args->now, args->rem); in call_nanosleep() 41 static 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()
|
| H A D | futex.c | 20 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()
|
| H A D | timer.c | 18 static 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()
|
| H A D | timens.h | 30 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()
|
| H A D | gettime_perf.c | 47 static void test(clock_t clockid, char *clockstr, bool in_ns) in test() argument 53 vdso_clock_gettime(clockid, &start); in test() 58 vdso_clock_gettime(clockid, &tp); in test()
|
| /linux/tools/perf/util/ |
| H A D | clockid.c | 14 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()
|
| /linux/fs/ |
| H A D | timerfd.c | 40 int clockid; member 54 return ctx->clockid == CLOCK_REALTIME_ALARM || in isalarm() 55 ctx->clockid == CLOCK_BOOTTIME_ALARM; in isalarm() 160 if ((ctx->clockid == CLOCK_REALTIME || in timerfd_setup_cancel() 161 ctx->clockid == CLOCK_REALTIME_ALARM) && in timerfd_setup_cancel() 192 int clockid = ctx->clockid; in timerfd_setup() local 204 ctx->clockid == CLOCK_REALTIME_ALARM ? in timerfd_setup() 208 hrtimer_setup(&ctx->t.tmr, timerfd_tmrproc, clockid, htmode); in timerfd_setup() 214 texp = timens_ktime_to_host(clockid, texp); in timerfd_setup() 338 ctx->clockid, in timerfd_show() [all …]
|
| /linux/tools/testing/selftests/futex/include/ |
| H A D | futex2test.h | 67 unsigned long flags, struct timespec *timo, clockid_t clockid) in futex_waitv() argument 74 return syscall(__NR_futex_waitv, waiters, nr_waiters, flags, &ts, clockid); in futex_waitv() 85 struct timespec *timeout, clockid_t clockid) in futex2_wait() argument 87 return syscall(__NR_futex_wait, uaddr, val, ~0U, flags, timeout, clockid); in futex2_wait()
|
| /linux/tools/include/nolibc/sys/ |
| H A D | timerfd.h | 20 int sys_timerfd_create(int clockid, int flags) in sys_timerfd_create() argument 22 return my_syscall2(__NR_timerfd_create, clockid, flags); in sys_timerfd_create() 26 int timerfd_create(int clockid, int flags) in timerfd_create() argument 28 return __sysret(sys_timerfd_create(clockid, flags)); in timerfd_create()
|
| /linux/net/sched/ |
| H A D | sch_etf.c | 31 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() 371 qopt->delta, qopt->clockid, in etf_init() 389 q->clockid = qopt->clockid; in etf_init() 394 switch (q->clockid) { in etf_init() 412 qdisc_watchdog_init_clockid(&q->watchdog, sch, q->clockid); in etf_init() 471 opt.clockid = READ_ONCE(q->clockid); in etf_dump()
|
| H A D | act_gate.c | 274 enum tk_offsets tko, s32 clockid, in gate_setup_timer() argument 280 clockid == gact->param.tcfg_clockid) in gate_setup_timer() 288 gact->param.tcfg_clockid = clockid; in gate_setup_timer() 290 hrtimer_setup(&gact->hitimer, gate_timer_func, clockid, HRTIMER_MODE_ABS_SOFT); in gate_setup_timer() 305 s32 clockid = CLOCK_TAI; in tcf_gate_init() local 325 clockid = nla_get_s32(tb[TCA_GATE_CLOCKID]); in tcf_gate_init() 326 switch (clockid) { in tcf_gate_init() 416 gate_setup_timer(gact, basetime, tk_offset, clockid, in tcf_gate_init()
|
| /linux/include/linux/ |
| H A D | time_namespace.h | 67 int clockid; member 102 ktime_t do_timens_ktime_to_host(clockid_t clockid, ktime_t tim, 105 static inline ktime_t timens_ktime_to_host(clockid_t clockid, ktime_t tim) in timens_ktime_to_host() argument 112 return do_timens_ktime_to_host(clockid, tim, &ns->offsets); in timens_ktime_to_host() 172 static inline ktime_t timens_ktime_to_host(clockid_t clockid, ktime_t tim) in timens_ktime_to_host() argument
|
| H A D | ptp_clock_kernel.h | 55 clockid_t clockid; member 513 ktime_get_clock_ts64(sts->clockid, &sts->pre_ts); in ptp_read_system_prets() 519 ktime_get_clock_ts64(sts->clockid, &sts->post_ts); in ptp_read_system_postts()
|
| /linux/kernel/futex/ |
| H A D | syscalls.c | 256 clockid_t clockid, struct hrtimer_sleeper *to) in futex2_setup_timeout() argument 266 if (clockid == CLOCK_REALTIME) { in futex2_setup_timeout() 271 if (clockid != CLOCK_REALTIME && clockid != CLOCK_MONOTONIC) in futex2_setup_timeout() 320 struct __kernel_timespec __user *, timeout, clockid_t, clockid) in SYSCALL_DEFINE5() argument 333 if (timeout && (ret = futex2_setup_timeout(timeout, clockid, &to))) in SYSCALL_DEFINE5() 404 clockid_t, clockid) in SYSCALL_DEFINE6() argument 420 if (timeout && (ret = futex2_setup_timeout(timeout, clockid, &to))) in SYSCALL_DEFINE6()
|
| /linux/kernel/time/ |
| H A D | hrtimer.c | 79 .clockid = CLOCK_MONOTONIC, 83 .clockid = CLOCK_REALTIME, 87 .clockid = CLOCK_BOOTTIME, 91 .clockid = CLOCK_TAI, 95 .clockid = CLOCK_MONOTONIC, 99 .clockid = CLOCK_REALTIME, 103 .clockid = CLOCK_BOOTTIME, 107 .clockid = CLOCK_TAI, 461 static inline void debug_setup(struct hrtimer *timer, clockid_t clockid, enum hrtimer_mode mode) in debug_setup() argument 464 trace_hrtimer_setup(timer, clockid, mode); in debug_setup() [all …]
|
| H A D | namespace.c | 24 ktime_t do_timens_ktime_to_host(clockid_t clockid, ktime_t tim, in do_timens_ktime_to_host() argument 29 switch (clockid) { in do_timens_ktime_to_host() 350 static void show_offset(struct seq_file *m, int clockid, struct timespec64 *ts) in show_offset() argument 354 switch (clockid) { in show_offset() 404 switch (off->clockid) { in proc_timens_set_offset() 443 switch (off->clockid) { in proc_timens_set_offset()
|
| /linux/include/trace/events/ |
| H A D | timer.h | 195 TP_PROTO(struct hrtimer *hrtimer, clockid_t clockid, 198 TP_ARGS(hrtimer, clockid, mode), 202 __field( clockid_t, clockid ) 208 __entry->clockid = clockid; 213 decode_clockid(__entry->clockid),
|
| /linux/Documentation/translations/zh_CN/userspace-api/ |
| H A D | futex2.rst | 31 unsigned int flags, struct timespec *timeout, clockid_t clockid) 66 ``struct timespec *timeout`` 是一个指向绝对超时时间的可选参数。你需要在 ``clockid``
|
| /linux/tools/testing/selftests/futex/functional/ |
| H A D | futex_wait_timeout.c | 66 static int futex_get_abs_timeout(clockid_t clockid, struct timespec *to, in futex_get_abs_timeout() argument 69 if (clock_gettime(clockid, to)) in futex_get_abs_timeout()
|