/third_party/musl/libc-test/src/functionalext/supplement/time/ |
H A D | clock_nanosleep.c | 35 ret = clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &ts, NULL); in clock_nanosleep_0100() 50 ret = clock_nanosleep(CLOCK_TAI, TIMER_ABSTIME, &ts, NULL); in clock_nanosleep_0200() 65 ret = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &ts, NULL); in clock_nanosleep_0300() 80 ret = clock_nanosleep(CLOCK_BOOTTIME, TIMER_ABSTIME, &ts, NULL); in clock_nanosleep_0400() 96 ret = clock_nanosleep(CLOCK_REALTIME, 0, &ts, NULL); in clock_nanosleep_0500() 112 ret = clock_nanosleep(CLOCK_THREAD_CPUTIME_ID, TIMER_ABSTIME, &ts, NULL); in clock_nanosleep_0600()
|
/third_party/ltp/testcases/kernel/syscalls/clock_nanosleep/ |
H A D | clock_nanosleep03.c | 9 * Test that clock_nanosleep() adds correctly an offset with absolute timeout 27 { .clock_gettime = libc_clock_gettime, .clock_nanosleep = libc_clock_nanosleep, .ts_type = TST_LIBC_TIMESPEC, .desc = "vDSO or syscall with libc spec"}, 30 { .clock_gettime = sys_clock_gettime, .clock_nanosleep = sys_clock_nanosleep, .ts_type = TST_KERN_OLD_TIMESPEC, .desc = "syscall with old kernel spec"}, 34 { .clock_gettime = sys_clock_gettime64, .clock_nanosleep = sys_clock_nanosleep64, .ts_type = TST_KERN_TIMESPEC, .desc = "syscall time64 with kernel spec"}, 65 TEST(tv->clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, tst_ts_get(&sleep_abs), NULL)); in verify_clock_nanosleep() 70 if ((tv->clock_nanosleep == libc_clock_nanosleep) && TST_RET) { in verify_clock_nanosleep() 76 tst_res(TFAIL | TTERRNO, "clock_nanosleep(2) failed for clock %s", in verify_clock_nanosleep() 90 tst_res(TFAIL, "clock_nanosleep() slept too long %lli", diff); in verify_clock_nanosleep() 95 tst_res(TFAIL, "clock_nanosleep() slept too short %lli", diff); in verify_clock_nanosleep() 99 tst_res(TPASS, "clock_nanosleep() slep in verify_clock_nanosleep() [all...] |
H A D | clock_nanosleep04.c | 20 { .clock_gettime = libc_clock_gettime, .clock_nanosleep = libc_clock_nanosleep, .ts_type = TST_LIBC_TIMESPEC, .desc = "vDSO or syscall with libc spec"}, 23 { .clock_gettime = sys_clock_gettime, .clock_nanosleep = sys_clock_nanosleep, .ts_type = TST_KERN_OLD_TIMESPEC, .desc = "syscall with old kernel spec"}, 27 { .clock_gettime = sys_clock_gettime64, .clock_nanosleep = sys_clock_nanosleep64, .ts_type = TST_KERN_TIMESPEC, .desc = "syscall time64 with kernel spec"}, 50 TEST(tv->clock_nanosleep(tcase[i], TIMER_ABSTIME, tst_ts_get(&ts), NULL)); in do_test() 53 tst_res(TFAIL | TTERRNO, "clock_nanosleep(2) failed for clock %s", in do_test() 57 tst_res(TPASS, "clock_nanosleep(2) passed for clock %s", in do_test()
|
H A D | clock_nanosleep01.c | 44 int flags; /* clock_nanosleep flags parameter */ 110 { .clock_nanosleep = libc_clock_nanosleep, .ts_type = TST_LIBC_TIMESPEC, .desc = "vDSO or syscall with libc spec"}, 113 { .clock_nanosleep = sys_clock_nanosleep, .ts_type = TST_KERN_OLD_TIMESPEC, .desc = "syscall with old kernel spec"}, 117 { .clock_nanosleep = sys_clock_nanosleep64, .ts_type = TST_KERN_TIMESPEC, .desc = "syscall time64 with kernel spec"}, 142 tv->clock_nanosleep == libc_clock_nanosleep) { in do_test() 164 TEST(tv->clock_nanosleep(tc->clk_id, tc->flags, request, remain)); in do_test() 166 if (tv->clock_nanosleep == libc_clock_nanosleep) { in do_test() 196 "The clock_nanosleep() haven't updated" in do_test() 218 tst_res(TPASS | TTERRNO, "clock_nanosleep() failed with"); in do_test()
|
H A D | clock_nanosleep02.c | 8 * clock_nanosleep() should return with value 0 and the process should be 20 TEST(clock_nanosleep(clk_id, 0, &t, NULL)); in sample_fn() 34 .scall = "clock_nanosleep()",
|
/third_party/musl/Benchmark/musl/ |
H A D | libc_time.cpp | 70 benchmark::DoNotOptimize(clock_nanosleep(CLOCK_REALTIME, 0, &req, &rem)); in Bm_function_Clock_nanosleep_realtime() 79 benchmark::DoNotOptimize(clock_nanosleep(CLOCK_REALTIME_COARSE, 0, &req, &rem)); in Bm_function_Clock_nanosleep_realtime_raw() 88 benchmark::DoNotOptimize(clock_nanosleep(CLOCK_REALTIME_COARSE, 0, &req, &rem)); in Bm_function_Clock_nanosleep_realtime_coarse() 97 benchmark::DoNotOptimize(clock_nanosleep(CLOCK_MONOTONIC, 0, &req, &rem)); in Bm_function_Clock_nanosleep_monotonic() 105 benchmark::DoNotOptimize(clock_nanosleep(CLOCK_MONOTONIC_COARSE, 0, &req, &rem)); in Bm_function_Clock_nanosleep_monotonic_coarse() 113 benchmark::DoNotOptimize(clock_nanosleep(CLOCK_MONOTONIC_RAW, 0, &req, &rem)); in Bm_function_Clock_nanosleep_monotonic_raw() 121 benchmark::DoNotOptimize(clock_nanosleep(CLOCK_BOOTTIME, 0, &req, &rem)); in Bm_function_Clock_nanosleep_boottime()
|
/third_party/skia/third_party/externals/oboe/src/common/ |
H A D | AudioClock.h | 50 return 0 - clock_nanosleep(clockId, TIMER_ABSTIME, &time, NULL); in sleepUntilNanoTime() 67 return 0 - clock_nanosleep(clockId, 0, &time, NULL); in sleepForNanos()
|
/third_party/rust/crates/rustix/src/backend/libc/thread/ |
H A D | syscalls.rs | 43 target_os = "freebsd", // FreeBSD 12 has clock_nanosleep, but libc targets FreeBSD 11. 56 // 32-bit gnu version: libc has `clock_nanosleep` but it is not y2038 safe by 81 // Main version: libc is y2038 safe and has `clock_nanosleep`. 87 match c::clock_nanosleep(id as c::clockid_t, flags, request, remain.as_mut_ptr()) { 115 match c::clock_nanosleep( in clock_nanosleep_relative_old() 137 target_os = "freebsd", // FreeBSD 12 has clock_nanosleep, but libc targets FreeBSD 11. 149 // 32-bit gnu version: libc has `clock_nanosleep` but it is not y2038 safe by 173 // Main version: libc is y2038 safe and has `clock_nanosleep`. 178 match unsafe { c::clock_nanosleep(id as c::clockid_t, flags, request, null_mut()) } { 197 match unsafe { c::clock_nanosleep(i in clock_nanosleep_absolute_old() [all...] |
/third_party/musl/porting/uniproton/kernel/include/ |
H A D | time.h | 105 int clock_nanosleep (clockid_t, int, const struct timespec *, struct timespec *); 152 __REDIR(clock_nanosleep, __clock_nanosleep_time64);
|
/third_party/musl/porting/liteos_m/user/include/ |
H A D | time.h | 104 int clock_nanosleep (clockid_t, int, const struct timespec *, struct timespec *); 151 __REDIR(clock_nanosleep, __clock_nanosleep_time64);
|
/third_party/musl/porting/liteos_m/kernel/include/ |
H A D | time.h | 105 int clock_nanosleep (clockid_t, int, const struct timespec *, struct timespec *); 152 __REDIR(clock_nanosleep, __clock_nanosleep_time64);
|
/third_party/musl/libc-test/src/functionalext/supplement/time/time_gtest/ |
H A D | sys_clock_test.cpp | 310 * @tc.desc: Aim to assess the accuracy and reliability of the clock_nanosleep function by measuring the elapsed 318 int result = clock_nanosleep(CLOCK_MONOTONIC, 0, &req, nullptr); in HWTEST_F() 326 * @tc.desc: Validate the error handling mechanism of the clock_nanosleep function when an invalid clock ID is 334 int err = clock_nanosleep(-1, 0, &req, &rem); in HWTEST_F() 340 * @tc.desc: Validate the error handling mechanism of the clock_nanosleep function when an invalid flag is encountered, 349 int result = clock_nanosleep(CLOCK_THREAD_CPUTIME_ID, 0, &req, nullptr); in HWTEST_F()
|
/third_party/musl/porting/liteos_a/kernel/include/ |
H A D | time.h | 120 int clock_nanosleep (clockid_t, int, const struct timespec *, struct timespec *); 167 __REDIR(clock_nanosleep, __clock_nanosleep_time64);
|
/third_party/ltp/testcases/kernel/syscalls/clock_gettime/ |
H A D | leapsec01.c | 105 ret = clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &target, NULL); in test_hrtimer_early_expiration() 107 tst_res(TINFO | TERRNO, "clock_nanosleep"); in test_hrtimer_early_expiration() 156 clock_nanosleep(CLOCK_MONOTONIC, 0, &sleeptime, NULL); in run_leapsec()
|
/third_party/musl/include/ |
H A D | time.h | 107 int clock_nanosleep (clockid_t, int, const struct timespec *, struct timespec *); 154 __REDIR(clock_nanosleep, __clock_nanosleep_time64);
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/definitions/time_h/ |
H A D | 14-1-buildonly.c | 10 int clock_nanosleep(clockid_t, int, const struct timespec *, 23 dummyvar = clock_nanosleep; in dummyfcn()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/ |
H A D | 13-1.c | 8 * Test that clock_nanosleep() sets errno to EINVAL if clock_id does 27 if (clock_nanosleep(BOGUSCLOCKID, 0, &tssleep, NULL) == EINVAL) { in main()
|
H A D | 1-1.c | 8 * Test that clock_nanosleep() causes the current thread to be suspended 30 if (clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL) != 0) { in main() 31 printf("clock_nanosleep() did not return success\n"); in main() 55 printf("clock_nanosleep() did not sleep long enough\n"); in main()
|
H A D | 3-1.c | 8 * Test that if TIMER_ABSTIME is set in flags, then if clock_nanosleep() 9 * parameter rqtp specifies a time in the past, clock_nanosleep() 13 * - Set clock_nanosleep() to sleep until current time - SLEEPSEC 41 if (clock_nanosleep(CLOCK_REALTIME, flags, &tssleep, NULL) != 0) { in main() 42 printf("clock_nanosleep() did not return success\n"); in main() 56 printf("FAIL: clock_nanosleep() slept\n"); in main()
|
H A D | 2-1.c | 8 * Test that if TIMER_ABSTIME is set in flags, then clock_nanosleep() 12 * - Set clock_nanosleep() to sleep for current time + SLEEPSEC 40 if (clock_nanosleep(CLOCK_REALTIME, flags, &tssleep, NULL) != 0) { in main() 41 printf("clock_nanosleep() did not return success\n"); in main() 55 printf("clock_nanosleep() slept too long\n"); in main() 60 printf("clock_nanosleep() did not sleep long enough\n"); in main()
|
H A D | 11-1.c | 8 * Test that clock_nanosleep() sets errno to EINVAL if rqtp contained a 42 if (clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL) != in main()
|
H A D | 1-4.c | 8 * Test that clock_nanosleep() causes the current thread to be suspended 35 clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL); in main()
|
H A D | 2-3.c | 8 * Test that clock_nanosleep() causes the current thread to be suspended 44 clock_nanosleep(CLOCK_REALTIME, flags, &tssleep, NULL); in main()
|
H A D | 10-1.c | 8 * Test that clock_nanosleep() sets errno=EINTR if it was interruped 53 if (clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL) == EINTR) { in main()
|
/third_party/musl/compat/time32/ |
H A D | clock_nanosleep_time32.c | 8 int ret = clock_nanosleep(clk, flags, (&(struct timespec){ in __clock_nanosleep_time32()
|