Home
last modified time | relevance | path

Searched refs:ts (Results 1 – 10 of 10) sorted by relevance

/nptl/
A Dtst-sem13.c28 struct timespec ts = { 0, 1000000001 }; /* Invalid. */ in do_test_wait() local
30 TEST_VERIFY_EXIT (waitfn (&u.s, &ts) < 0); in do_test_wait()
40 ts.tv_sec = /* Invalid. */ -2; in do_test_wait()
41 ts.tv_nsec = 0; in do_test_wait()
43 TEST_VERIFY_EXIT (waitfn (&u.s, &ts) < 0); in do_test_wait()
53 int test_sem_timedwait (sem_t *sem, struct timespec *ts) in test_sem_timedwait() argument
55 return sem_timedwait (sem, ts); in test_sem_timedwait()
58 int test_sem_clockwait_monotonic (sem_t *sem, struct timespec *ts) in test_sem_clockwait_monotonic() argument
60 return sem_clockwait (sem, CLOCK_MONOTONIC, ts); in test_sem_clockwait_monotonic()
63 int test_sem_clockwait_realtime (sem_t *sem, struct timespec *ts) in test_sem_clockwait_realtime() argument
[all …]
A Dtst-sem12.c6 struct timespec ts; \
9 TIMEVAL_TO_TIMESPEC (&tv, &ts); \
10 ts.tv_sec += 60;
12 #define SEM_WAIT(s) sem_timedwait (s, &ts)
A Dtst-cond26.c39 const struct timespec ts = make_timespec (0, 0); in do_test() local
44 CLOCK_PROCESS_CPUTIME_ID, &ts), EINVAL); in do_test()
48 CLOCK_THREAD_CPUTIME_ID, &ts), EINVAL); in do_test()
55 CLOCK_REALTIME_COARSE, &ts), EINVAL); in do_test()
59 CLOCK_MONOTONIC_RAW, &ts), EINVAL); in do_test()
63 CLOCK_MONOTONIC_COARSE, &ts), EINVAL); in do_test()
67 CLOCK_BOOTTIME, &ts), EINVAL); in do_test()
72 NOT_A_VALID_CLOCK, &ts), EINVAL); in do_test()
A Dtst-sem17.c38 const struct timespec ts = make_timespec (0, 0); in do_test() local
42 TEST_COMPARE (sem_clockwait (&s, CLOCK_PROCESS_CPUTIME_ID, &ts), -1); in do_test()
46 TEST_COMPARE (sem_clockwait (&s, CLOCK_THREAD_CPUTIME_ID, &ts), -1); in do_test()
53 TEST_COMPARE (sem_clockwait (&s, CLOCK_REALTIME_COARSE, &ts), -1); in do_test()
57 TEST_COMPARE (sem_clockwait (&s, CLOCK_MONOTONIC_RAW, &ts), -1); in do_test()
61 TEST_COMPARE (sem_clockwait (&s, CLOCK_MONOTONIC_COARSE, &ts), -1); in do_test()
65 TEST_COMPARE (sem_clockwait (&s, CLOCK_BOOTTIME, &ts), -1); in do_test()
70 TEST_COMPARE (sem_clockwait (&s, NOT_A_VALID_CLOCK, &ts), -1); in do_test()
A Dtst-clock2.c74 struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; in do_test() local
75 TEMP_FAILURE_RETRY (nanosleep (&ts, &ts)); in do_test()
120 ts.tv_sec = 0; in do_test()
121 ts.tv_nsec = 100000000; in do_test()
122 TEMP_FAILURE_RETRY (nanosleep (&ts, &ts)); in do_test()
169 ts.tv_sec = 0; in do_test()
170 ts.tv_nsec = 0; in do_test()
172 if (clock_settime (cl[i], &ts) != 0) in do_test()
180 if (clock_gettime (cl[i], &ts) != 0) in do_test()
186 if (ts.tv_sec > t[i].tv_sec in do_test()
[all …]
A Dtst-rwlock6.c118 struct timespec ts; in do_test_clock() local
119 xclock_gettime (clockid_for_get, &ts); in do_test_clock()
120 ++ts.tv_sec; in do_test_clock()
124 ? pthread_rwlock_timedwrlock (&r, &ts) in do_test_clock()
125 : pthread_rwlock_clockwrlock (&r, clockid, &ts); in do_test_clock()
132 xclock_gettime (clockid_for_get, &ts); in do_test_clock()
133 ++ts.tv_sec; in do_test_clock()
135 TEST_COMPARE (pthread_rwlock_timedrdlock (&r, &ts), EDEADLK); in do_test_clock()
141 xclock_gettime (clockid_for_get, &ts); in do_test_clock()
142 ++ts.tv_sec; in do_test_clock()
[all …]
A Dtst-rwlock9.c67 struct timespec ts; in writer_thread() local
75 xclock_gettime (clockid_for_get, &ts); in writer_thread()
77 ts = timespec_add (ts, timeout); in writer_thread()
78 ts = timespec_add (ts, timeout); in writer_thread()
83 ? pthread_rwlock_timedwrlock (&lock, &ts) in writer_thread()
84 : pthread_rwlock_clockwrlock (&lock, clockid, &ts); in writer_thread()
114 struct timespec ts; in reader_thread() local
122 xclock_gettime (clockid_for_get, &ts); in reader_thread()
124 ts = timespec_add (ts, timeout); in reader_thread()
129 e = pthread_rwlock_timedrdlock (&lock, &ts); in reader_thread()
[all …]
A Dtst-rwlock15.c34 struct timespec ts; in writer() local
35 if (clock_gettime (CLOCK_REALTIME, &ts) != 0) in writer()
40 ts.tv_sec += 1; in writer()
41 int e = pthread_rwlock_timedwrlock (&r, &ts); in writer()
A Dtst-cancel17.c77 struct timespec ts = { .tv_sec = 1000, .tv_nsec = 0 }; in tf2() local
79 TEMP_FAILURE_RETRY (aio_suspend (l, 1, &ts)); in tf2()
131 struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; in do_test() local
132 while (nanosleep (&ts, &ts) != 0) in do_test()
180 ts.tv_sec = 0; in do_test()
181 ts.tv_nsec = 100000000; in do_test()
182 while (nanosleep (&ts, &ts) != 0) in do_test()
A Dtst-rwlock7.c114 struct timespec ts; in do_test_clock() local
115 xclock_gettime (clockid_for_get, &ts); in do_test_clock()
117 ++ts.tv_sec; in do_test_clock()
121 if (pthread_rwlock_timedrdlock (&r, &ts) != 0) in do_test_clock()
124 if (pthread_rwlock_clockrdlock (&r, clockid, &ts) != 0) in do_test_clock()

Completed in 9 milliseconds