/third_party/musl/libc-test/src/functionalext/thread/ |
H A D | pthread_mutex_ext.c | 96 GetDelayedTimeByClockid(&ts, DELAY_TIME_100_MS, CLOCK_MONOTONIC); in PthreadClocklockOutMonoTime() 97 TEST(pthread_mutex_clocklock(mtx, CLOCK_MONOTONIC, &ts) == ETIMEDOUT); in PthreadClocklockOutMonoTime() 99 clock_gettime(CLOCK_MONOTONIC, &tsNow); in PthreadClocklockOutMonoTime() 107 * @tc.desc : test pthread_mutex_clocklock whith timeout by CLOCK_MONOTONIC 132 GetDelayedTimeByClockid(&ts, DELAY_TIME_100_MS, CLOCK_MONOTONIC); in PthreadClocklockNoOutMonoTime() 133 TEST(pthread_mutex_clocklock(mtx, CLOCK_MONOTONIC, &ts) == 0); in PthreadClocklockNoOutMonoTime() 139 * @tc.desc : test pthread_mutex_clocklock with no timeout by CLOCK_MONOTONIC 203 GetDelayedTimeByClockid(&ts, DELAY_TIME_100_MS, CLOCK_MONOTONIC); in PthreadClocklockNoOutMonoTime2() 204 TEST(pthread_mutex_clocklock(mtx, CLOCK_MONOTONIC, &ts) == 0); in PthreadClocklockNoOutMonoTime2() 222 clock_gettime(CLOCK_MONOTONIC, in pthread_mutex_clocklock_0060() [all...] |
H A D | pthread_rwlock_wrlock.c | 97 GetDelayedTimeByClockid(&ts, SLEEP_100_MS, CLOCK_MONOTONIC); in RwlockClockMonotonicTimeOut2() 98 EXPECT_EQ(pthread_rwlock_clockwrlock(&w_rwlock5, CLOCK_MONOTONIC, &ts), ETIMEDOUT); in RwlockClockMonotonicTimeOut2() 99 clock_gettime(CLOCK_MONOTONIC, &tsNow); in RwlockClockMonotonicTimeOut2() 118 GetDelayedTimeByClockid(&ts, SLEEP_100_MS, CLOCK_MONOTONIC); in RwlockClockMonotonicTimeWait2() 119 EXPECT_EQ(pthread_rwlock_clockwrlock(&w_rwlock6, CLOCK_MONOTONIC, &ts), 0); in RwlockClockMonotonicTimeWait2() 146 GetDelayedTimeByClockid(&ts, SLEEP_100_MS, CLOCK_MONOTONIC); in RwlockMonotonicTime2() 148 clock_gettime(CLOCK_MONOTONIC, &tsNow); in RwlockMonotonicTime2() 167 GetDelayedTimeByClockid(&ts, SLEEP_100_MS, CLOCK_MONOTONIC); in RwlockMonotonicTime4() 183 EXPECT_EQ(clock_gettime(CLOCK_MONOTONIC, &ts), 0); in pthread_rwlock_timedwrlock_0010() 219 clockid_t clock_id = CLOCK_MONOTONIC; in pthread_rwlock_timedwrlock_0030() [all...] |
H A D | pthread_rwlock_rdlock.c | 120 GetDelayedTimeByClockid(&ts, DELAY_TIME_100_MS, CLOCK_MONOTONIC); in PthreadClockRdlockNoOutMonoTimeR2() 121 TEST(pthread_rwlock_clockrdlock(&g_rwlock3, CLOCK_MONOTONIC, &ts) == 0); in PthreadClockRdlockNoOutMonoTimeR2() 128 * @tc.desc : test pthread_rwlock_clockrdlock with no timeout by CLOCK_MONOTONIC , write - read 162 GetDelayedTimeByClockid(&ts, DELAY_TIME_100_MS, CLOCK_MONOTONIC); in PthreadClockRdlockOutMonoTimeR2() 163 TEST(pthread_rwlock_clockrdlock(&g_rwlock4, CLOCK_MONOTONIC, &ts) == ETIMEDOUT); in PthreadClockRdlockOutMonoTimeR2() 164 clock_gettime(CLOCK_MONOTONIC, &tsNow); in PthreadClockRdlockOutMonoTimeR2() 172 * @tc.desc : test pthread_rwlock_clockrdlock with timeout by CLOCK_MONOTONIC, write - read 204 GetDelayedTimeByClockid(&ts, DELAY_TIME_100_MS, CLOCK_MONOTONIC); in PthreadTimedRdlockMonoNPNoOutR2() 212 * @tc.desc : test pthread_rwlock_timedrdlock_monotonic_np with no timeout by CLOCK_MONOTONIC, write - read 246 GetDelayedTimeByClockid(&ts, DELAY_TIME_100_MS, CLOCK_MONOTONIC); in PthreadTimedRdlockMonoNPOutR2() [all...] |
H A D | pthread_cond_timedwait.c | 139 EXPECT_EQ(clock_gettime(CLOCK_MONOTONIC, &ts), 0); in pthread_cond_timedwait_monotonic_np_0010() 204 clock_id = CLOCK_MONOTONIC; in pthread_cond_clockwait_0010() 327 clock_gettime(CLOCK_MONOTONIC, &ts); in ClockWaitTimedwait4() 331 clockid_t clock_id = CLOCK_MONOTONIC; in ClockWaitTimedwait4() 339 * @tc.desc : Test the case of pthread_cond_clockwait timewait by CLOCK_MONOTONIC 361 clockid_t clock_id = CLOCK_MONOTONIC; in ClockWaitTimeOut2() 364 clock_gettime(CLOCK_MONOTONIC, &tsNow); in ClockWaitTimeOut2() 376 * @tc.desc : Test the case of pthread_cond_clockwait timeout by CLOCK_MONOTONIC 396 clock_gettime(CLOCK_MONOTONIC, &ts); in ClockWaitTimeMismatch() 506 GetDelayedTimeByClockid(&ts, SLEEP_100_MS, CLOCK_MONOTONIC); in ClockWaitTimeMismatch5() [all...] |
/third_party/ltp/testcases/kernel/syscalls/futex/ |
H A D | futex_waitv01.c | 30 SAFE_CLOCK_GETTIME(CLOCK_MONOTONIC, to); in init_timeout() 51 TST_EXP_FAIL(futex_waitv(waitv, 1, 0, &to, CLOCK_MONOTONIC), EINVAL, in test_invalid_flags() 64 TST_EXP_FAIL(futex_waitv(waitv, 1, 0, &to, CLOCK_MONOTONIC), EINVAL, in test_unaligned_address() 77 TST_EXP_FAIL(futex_waitv(waitv, 1, 0, &to, CLOCK_MONOTONIC), EFAULT, in test_null_address() 87 TST_EXP_FAIL(futex_waitv(NULL, 1, 0, &to, CLOCK_MONOTONIC), EINVAL, in test_null_waiters() 110 TST_EXP_FAIL(futex_waitv(waitv, 129, 0, &to, CLOCK_MONOTONIC), EINVAL, in test_invalid_nr_futexes() 112 TST_EXP_FAIL(futex_waitv(waitv, 0, 0, &to, CLOCK_MONOTONIC), EINVAL, in test_invalid_nr_futexes() 126 TST_EXP_FAIL(futex_waitv(waitv, 1, 0, &to, CLOCK_MONOTONIC), EAGAIN, in test_mismatch_between_uaddr_and_val()
|
/third_party/musl/libc-test/src/functionalext/supplement/thread/thread_gtest/ |
H A D | pthread_cond_test.cpp | 52 EXPECT_EQ(0, pthread_condattr_setclock(&condAttr, CLOCK_MONOTONIC)); in InitMonotonic() 55 EXPECT_EQ(CLOCK_MONOTONIC, clock); in InitMonotonic() 130 * @tc.desc: Set the negative timeout time of the CLOCK_MONOTONIC clock as the function to determine whether the return 131 * is invalid, set the large timeout time of the CLOCK_MONOTONIC clock as the function to determine whether 132 * the return is invalid, and set the normal timeout time of the CLOCK_MONOTONIC clock as the function to 139 MakeTimeout(CLOCK_MONOTONIC, pthread_cond_timedwait_monotonic_np); in HWTEST_F() 141 MakeTimeout(CLOCK_MONOTONIC, pthread_cond_timedwait_monotonic_np); in HWTEST_F() 147 * @tc.desc: Set the negative timeout time of the CLOCK_MONOTONIC clock as the function to determine whether the return 148 * is invalid, set the large timeout time of the CLOCK_MONOTONIC clock as the function to determine whether 149 * the return is invalid, and set the normal timeout time of the CLOCK_MONOTONIC cloc [all...] |
H A D | thread_mutex_test.cpp | 234 clock_gettime(CLOCK_MONOTONIC, &timeSpec_); in HWTEST_F() 239 clock_gettime(CLOCK_MONOTONIC, &timeSpec_); in HWTEST_F() 254 clock_gettime(CLOCK_MONOTONIC, &timeSpec_); in HWTEST_F() 263 clock_gettime(CLOCK_MONOTONIC, &ts); in HWTEST_F() 286 clock_gettime(CLOCK_MONOTONIC, &timeSpec_); in HWTEST_F() 287 EXPECT_EQ(ETIMEDOUT, pthread_mutex_clocklock(&mutex_, CLOCK_MONOTONIC, &timeSpec_)); in HWTEST_F() 289 EXPECT_EQ(EINVAL, pthread_mutex_clocklock(&mutex_, CLOCK_MONOTONIC, &timeSpec_)); in HWTEST_F() 291 clock_gettime(CLOCK_MONOTONIC, &timeSpec_); in HWTEST_F() 293 EXPECT_EQ(0, pthread_mutex_clocklock(&mutex_, CLOCK_MONOTONIC, &timeSpec_)); in HWTEST_F() 328 clock_gettime(CLOCK_MONOTONIC, in HWTEST_F() [all...] |
H A D | thread_rwlock_test.cpp | 160 * @tc.desc: Set the negative timeout time of the CLOCK_MONOTONIC clock as the function to determine whether the return 161 * is invalid, set the large timeout time of the CLOCK_MONOTONIC clock as the function to determine whether 162 * the return is invalid, and set the normal timeout time of the CLOCK_MONOTONIC clock as the function to 168 RwlockHandleControl* rhc = new RwlockHandleControl(&pthread_rwlock_timedwrlock_monotonic_np, CLOCK_MONOTONIC); in HWTEST_F() 176 * @tc.desc: Set the waiting time based on the CLOCK_MONOTONIC clock for this interface to determine its normal 183 EXPECT_EQ(0, clock_gettime(CLOCK_MONOTONIC, ×)); in HWTEST_F() 194 * @tc.desc: 1.Set the waiting time based on the CLOCK_MONOTONIC clock for this interface to determine its normal 201 EXPECT_EQ(0, clock_gettime(CLOCK_MONOTONIC, ×)); in HWTEST_F() 204 [&](pthread_rwlock_t* rwlock) { return pthread_rwlock_clockwrlock(rwlock, CLOCK_MONOTONIC, ×); }); in HWTEST_F() 256 * @tc.desc: Set the negative timeout time of the CLOCK_MONOTONIC cloc [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/ |
H A D | 3-1.c | 8 Test that parameter CLOCK_MONOTONIC returns seconds since the 21 #ifdef CLOCK_MONOTONIC in main() 27 printf("CLOCK_MONOTONIC unsupported\n"); in main() 31 if (clock_gettime(CLOCK_MONOTONIC, &ts1) != 0) { in main() 36 if (clock_gettime(CLOCK_MONOTONIC, &ts2) != 0) { in main() 43 if (clock_gettime(CLOCK_MONOTONIC, &ts3) != 0) { in main() 49 if (clock_gettime(CLOCK_MONOTONIC, &ts4) != 0) { in main() 64 printf("CLOCK_MONOTONIC unsupported\n"); in main()
|
/third_party/ltp/testcases/kernel/syscalls/clock_gettime/ |
H A D | clock_gettime03.c | 10 * process that has called the unshare() can adjust offsets for CLOCK_MONOTONIC 28 {CLOCK_MONOTONIC, CLOCK_MONOTONIC, 10}, 31 {CLOCK_MONOTONIC, CLOCK_MONOTONIC, -10}, 34 {CLOCK_MONOTONIC_RAW, CLOCK_MONOTONIC, 100}, 35 {CLOCK_MONOTONIC_COARSE, CLOCK_MONOTONIC, 100},
|
/third_party/ltp/testcases/kernel/syscalls/clock_nanosleep/ |
H A D | clock_nanosleep03.c | 10 * and CLOCK_MONOTONIC inside of a timer namespace. 13 * process that has called the unshare() can adjust offsets for CLOCK_MONOTONIC 42 ret = tv->clock_gettime(CLOCK_MONOTONIC, tst_ts_get(ts)); in do_clock_gettime() 44 tst_brk(TBROK | TERRNO, "clock_settime(CLOCK_MONOTONIC) failed"); in do_clock_gettime() 58 SAFE_FILE_PRINTF("/proc/self/timens_offsets", "%d %d 0", CLOCK_MONOTONIC, OFFSET_S); in verify_clock_nanosleep() 65 TEST(tv->clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, tst_ts_get(&sleep_abs), NULL)); in verify_clock_nanosleep() 77 tst_clock_name(CLOCK_MONOTONIC)); in verify_clock_nanosleep()
|
/third_party/ltp/testcases/kernel/syscalls/timerfd/ |
H A D | timerfd04.c | 12 process that has called the unshare() can adjust offsets for CLOCK_MONOTONIC 31 {CLOCK_MONOTONIC, CLOCK_MONOTONIC, 10}, 34 {CLOCK_MONOTONIC, CLOCK_MONOTONIC, -10},
|
/third_party/ffmpeg/libavutil/ |
H A D | time.c | 58 #if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC) in av_gettime_relative() 64 clock_gettime(CLOCK_MONOTONIC, &ts); in av_gettime_relative() 73 #if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC) in av_gettime_relative_is_monotonic()
|
/third_party/rust/crates/nix/test/sys/ |
H A D | test_timerfd.rs | 10 TimerFd::new(ClockId::CLOCK_MONOTONIC, TimerFlags::empty()).unwrap(); in test_timerfd_oneshot() 30 TimerFd::new(ClockId::CLOCK_MONOTONIC, TimerFlags::empty()).unwrap(); in test_timerfd_interval() 57 TimerFd::new(ClockId::CLOCK_MONOTONIC, TimerFlags::empty()).unwrap(); in test_timerfd_unset()
|
/third_party/lz4/examples/ |
H A D | compress_functions.c | 137 clock_gettime(CLOCK_MONOTONIC, &start); in bench() 150 clock_gettime(CLOCK_MONOTONIC, &start); in bench() 163 clock_gettime(CLOCK_MONOTONIC, &start); in bench() 196 clock_gettime(CLOCK_MONOTONIC, &start); in bench() 209 clock_gettime(CLOCK_MONOTONIC, &start); in bench() 220 clock_gettime(CLOCK_MONOTONIC, &end); in bench()
|
/third_party/ltp/lib/newlib_tests/ |
H A D | tst_expiration_timer.c | 16 tst_timer_start(CLOCK_MONOTONIC); in do_test() 26 tst_timer_check(CLOCK_MONOTONIC); in setup()
|
/third_party/skia/third_party/externals/microhttpd/src/microspdy/ |
H A D | internal.c | 33 #ifdef CLOCK_MONOTONIC in SPDYF_monotonic_time() 35 if (0 == clock_gettime (CLOCK_MONOTONIC, &ts)) in SPDYF_monotonic_time()
|
/third_party/musl/src/thread/ |
H A D | pthread_rwlock_clockrdlock.c | 25 case CLOCK_MONOTONIC: in pthread_rwlock_clockrdlock() 26 rw->_rw_clock = CLOCK_MONOTONIC; in pthread_rwlock_clockrdlock()
|
H A D | pthread_rwlock_clockwrlock.c | 25 case CLOCK_MONOTONIC: in pthread_rwlock_clockwrlock() 26 rw->_rw_clock = CLOCK_MONOTONIC; in pthread_rwlock_clockwrlock()
|
H A D | pthread_mutex_clocklock.c | 26 case CLOCK_MONOTONIC: in pthread_mutex_clocklock() 27 mutex_interface->_m_clock = CLOCK_MONOTONIC; in pthread_mutex_clocklock()
|
H A D | pthread_cond_clockwait.c | 25 case CLOCK_MONOTONIC: in pthread_cond_clockwait() 26 cond->_c_clock = CLOCK_MONOTONIC; in pthread_cond_clockwait()
|
/third_party/musl/porting/linux/user/src/thread/ |
H A D | pthread_rwlock_clockrdlock.c | 25 case CLOCK_MONOTONIC: in pthread_rwlock_clockrdlock() 26 rw->_rw_clock = CLOCK_MONOTONIC; in pthread_rwlock_clockrdlock()
|
H A D | pthread_rwlock_clockwrlock.c | 25 case CLOCK_MONOTONIC: in pthread_rwlock_clockwrlock() 26 rw->_rw_clock = CLOCK_MONOTONIC; in pthread_rwlock_clockwrlock()
|
H A D | pthread_mutex_clocklock.c | 26 case CLOCK_MONOTONIC: in pthread_mutex_clocklock() 27 mutex_interface->_m_clock = CLOCK_MONOTONIC; in pthread_mutex_clocklock()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/ |
H A D | 6-1.c | 8 * Test that clock_settime() cannot set the monotonic clock CLOCK_MONOTONIC, 9 * and will fail if invoked with clock CLOCK_MONOTONIC. 21 #ifdef CLOCK_MONOTONIC in main() 26 if (clock_settime(CLOCK_MONOTONIC, &tpset) == -1) { in main() 30 printf("clock_settime() did not fail with CLOCK_MONOTONIC\n"); in main() 36 printf("CLOCK_MONOTONIC not supported\n"); in main()
|