/sysdeps/pthread/ |
A D | tst-rwlock14.c | 52 struct timespec ts; in do_test() local 54 xclock_gettime (CLOCK_REALTIME, &ts); in do_test() 63 ts.tv_nsec = -1; in do_test() 65 TEST_COMPARE (pthread_rwlock_timedrdlock (&r, &ts), EINVAL); in do_test() 68 TEST_COMPARE (pthread_rwlock_timedwrlock (&r, &ts), EINVAL); in do_test() 72 ts.tv_nsec = 1000000000; in do_test() 74 TEST_COMPARE (pthread_rwlock_timedrdlock (&r, &ts), EINVAL); in do_test() 77 TEST_COMPARE (pthread_rwlock_timedwrlock (&r, &ts), EINVAL); in do_test() 81 ts.tv_nsec = (__typeof (ts.tv_nsec)) 0x100001000LL; in do_test() 82 if ((__typeof (ts.tv_nsec)) 0x100001000LL != 0x100001000LL) in do_test() [all …]
|
A D | tst-sem5.c | 37 struct timespec ts; in do_test_clock() local 43 xclock_gettime (clockid_for_get, &ts); in do_test_clock() 44 ts = timespec_add (ts, make_timespec (0, TIMESPEC_HZ/2)); in do_test_clock() 48 ? sem_timedwait (&s, &ts) in do_test_clock() 49 : sem_clockwait (&s, clockid, &ts)), -1); in do_test_clock() 51 TEST_TIMESPEC_NOW_OR_AFTER (clockid_for_get, ts); in do_test_clock()
|
A D | tst-cancel25.c | 40 struct timespec ts = { 10000, 0 }; in tf2() local 41 nanosleep (&ts, 0); in tf2() 75 struct timespec ts = { 10000, 0 }; in tf() local 76 nanosleep (&ts, 0); in tf() 109 struct timespec ts = { 0, 500000000 }; in do_test() local 110 while (nanosleep (&ts, &ts) != 0) in do_test() 139 ts.tv_sec = 0; in do_test() 140 ts.tv_nsec = 500000000; in do_test() 141 while (nanosleep (&ts, &ts) != 0) in do_test()
|
A D | tst-cond19.c | 33 struct timespec ts; in do_test() local 35 if (clock_gettime (CLOCK_REALTIME, &ts) != 0) in do_test() 41 ts.tv_nsec = -1; in do_test() 43 int e = pthread_cond_timedwait (&cond, &mut, &ts); in do_test() 55 ts.tv_nsec = 2000000000; in do_test() 57 e = pthread_cond_timedwait (&cond, &mut, &ts); in do_test()
|
A D | tst-timer.c | 53 struct timespec ts; in intr_sleep() local 55 ts.tv_sec = sec; in intr_sleep() 56 ts.tv_nsec = 0; in intr_sleep() 58 while (nanosleep (&ts, &ts) == -1 && errno == EINTR) in intr_sleep() 68 struct timespec ts; in main() local 82 retval = clock_gettime (CLOCK_REALTIME, &ts); in main() 94 retval, (intmax_t) ts.tv_sec, (intmax_t) ts.tv_nsec); in main() 96 retval = clock_getres (CLOCK_REALTIME, &ts); in main() 99 retval, (intmax_t) ts.tv_sec, (intmax_t) ts.tv_nsec); in main()
|
A D | tst-cond5.c | 36 struct timespec ts; in do_test() local 71 TIMEVAL_TO_TIMESPEC (&tv, &ts); in do_test() 72 ts.tv_nsec += 500000000; in do_test() 73 if (ts.tv_nsec >= 1000000000) in do_test() 75 ts.tv_nsec -= 1000000000; in do_test() 76 ++ts.tv_sec; in do_test() 78 err = pthread_cond_timedwait (&cond, &mut, &ts); in do_test()
|
A D | tst-cond9.c | 51 struct timespec ts; in tf() local 52 TIMEVAL_TO_TIMESPEC (&tv, &ts); in tf() 53 ts.tv_sec += 1000; in tf() 55 err = pthread_cond_timedwait (&cond, &mut, &ts); in tf() 98 struct timespec ts; in do_test() local 99 TIMEVAL_TO_TIMESPEC (&tv, &ts); in do_test() 100 ts.tv_sec += 1000; in do_test() 102 err = pthread_cond_timedwait (&cond, &mut, &ts); in do_test()
|
A D | tst-cancel22.c | 47 struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; in tf() local 48 TEMP_FAILURE_RETRY (nanosleep (&ts, &ts)); in tf() 54 struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; in tf() local 55 TEMP_FAILURE_RETRY (nanosleep (&ts, &ts)); in tf()
|
A D | tst-join5.c | 33 struct timespec ts = { .tv_sec = 0, .tv_nsec = 200000000 }; in wait_code() local 34 while (nanosleep (&ts, &ts) < 0) in wait_code() 47 const struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME), in thread_join() local 49 return pthread_timedjoin_np (thread, retval, &ts); in thread_join() 51 const struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME), in thread_join() 53 return pthread_clockjoin_np (thread, retval, CLOCK_REALTIME, &ts); in thread_join() 55 const struct timespec ts = timespec_add (xclock_now (CLOCK_MONOTONIC), in thread_join() 57 return pthread_clockjoin_np (thread, retval, CLOCK_MONOTONIC, &ts); in thread_join()
|
A D | tst-sem10.c | 44 struct timespec ts; in do_test() local 45 TIMEVAL_TO_TIMESPEC (&tv, &ts); in do_test() 48 ts.tv_sec -= 86400; in do_test() 58 if (TEMP_FAILURE_RETRY (sem_timedwait (&s, &ts)) != -1) in do_test()
|
A D | tst-cancel18.c | 51 struct timespec ts = { .tv_sec = arg == NULL ? 10000000 : 0, .tv_nsec = 0 }; in tf() local 52 TEMP_FAILURE_RETRY (clock_nanosleep (CLOCK_REALTIME, 0, &ts, &ts)); in tf() 85 struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; in do_test() local 86 while (nanosleep (&ts, &ts) != 0) in do_test()
|
A D | tst-eintr2.c | 39 struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME), in tf1() local 43 int e = pthread_mutex_timedlock (&m1, &ts); in tf1() 60 struct timespec ts = { .tv_sec = 0, .tv_nsec = 10000000 }; in tf2() local 61 nanosleep (&ts, NULL); in tf2()
|
/sysdeps/posix/ |
A D | sleep.c | 39 struct timespec ts = { 0, 0 }; in __sleep() local 42 if (sizeof (ts.tv_sec) <= sizeof (seconds)) in __sleep() 46 ts.tv_sec += MIN (seconds, max); in __sleep() 47 seconds -= (unsigned int) ts.tv_sec; in __sleep() 51 ts.tv_sec = (time_t) seconds; in __sleep() 55 if (__nanosleep (&ts, &ts) < 0) in __sleep() 58 return seconds + ts.tv_sec; in __sleep()
|
/sysdeps/mach/hurd/i386/ |
A D | longjmp-ts.c | 30 struct i386_thread_state *ts = state; in _hurd_longjmp_thread_state() local 32 ts->ebx = env[0].__jmpbuf[JB_BX]; in _hurd_longjmp_thread_state() 33 ts->esi = env[0].__jmpbuf[JB_SI]; in _hurd_longjmp_thread_state() 34 ts->edi = env[0].__jmpbuf[JB_DI]; in _hurd_longjmp_thread_state() 35 ts->ebp = env[0].__jmpbuf[JB_BP]; in _hurd_longjmp_thread_state() 36 ts->uesp = env[0].__jmpbuf[JB_SP]; in _hurd_longjmp_thread_state() 37 ts->eip = env[0].__jmpbuf[JB_PC]; in _hurd_longjmp_thread_state() 38 ts->eax = val ?: 1; in _hurd_longjmp_thread_state()
|
/sysdeps/unix/sysv/linux/ |
A D | tst-ppoll.c | 32 struct timespec ts; in test_ppoll_timeout() local 33 xclock_gettime (CLOCK_REALTIME, &ts); in test_ppoll_timeout() 35 ts = timespec_add (ts, timeout); in test_ppoll_timeout() 41 TEST_TIMESPEC_NOW_OR_AFTER (CLOCK_REALTIME, ts); in test_ppoll_timeout() 50 struct timespec ts = { TYPE_MAXIMUM (time_t), 0 }; in test_ppoll_large_timeout() local 52 TEST_COMPARE (ppoll (&fds, 1, &ts, 0), -1); in test_ppoll_large_timeout()
|
A D | tst-sigtimedwait.c | 33 struct timespec ts; in test_sigtimedwait_timeout() local 34 xclock_gettime (CLOCK_REALTIME, &ts); in test_sigtimedwait_timeout() 36 ts = timespec_add (ts, timeout); in test_sigtimedwait_timeout() 47 TEST_TIMESPEC_NOW_OR_AFTER (CLOCK_REALTIME, ts); in test_sigtimedwait_timeout() 56 struct timespec ts = { TYPE_MAXIMUM (time_t), 0 }; in test_sigtimedwait_large_timeout() local 62 TEST_COMPARE (sigtimedwait (&ss_usr1, NULL, &ts), -1); in test_sigtimedwait_large_timeout()
|
A D | timespec_getres.c | 23 __timespec_getres64 (struct __timespec64 *ts, int base) in __timespec_getres64() argument 27 __clock_getres64 (CLOCK_REALTIME, ts); in __timespec_getres64() 37 __timespec_getres (struct timespec *ts, int base) in libc_hidden_def() 44 if (ret == TIME_UTC && ts != NULL) in libc_hidden_def() 45 *ts = valid_timespec64_to_timespec (tp64); in libc_hidden_def()
|
A D | clock.c | 26 struct __timespec64 ts; in clock() local 31 if (__glibc_unlikely (__clock_gettime64 (CLOCK_PROCESS_CPUTIME_ID, &ts) != 0)) in clock() 34 return (ts.tv_sec * CLOCKS_PER_SEC in clock() 35 + ts.tv_nsec / (1000000000 / CLOCKS_PER_SEC)); in clock()
|
A D | timespec_get.c | 24 __timespec_get64 (struct __timespec64 *ts, int base) in __timespec_get64() argument 28 __clock_gettime64 (CLOCK_REALTIME, ts); in __timespec_get64() 38 __timespec_get (struct timespec *ts, int base) in libc_hidden_def() 53 *ts = valid_timespec64_to_timespec (tp64); in libc_hidden_def()
|
A D | ftime.c | 27 struct __timespec64 ts; in __ftime64() local 28 __clock_gettime64 (CLOCK_REALTIME, &ts); in __ftime64() 30 timebuf->time = ts.tv_sec; in __ftime64() 31 timebuf->millitm = ts.tv_nsec / 1000000; in __ftime64()
|
A D | time.c | 59 struct __timespec64 ts; in __time64() local 60 __clock_gettime64 (TIME_CLOCK_GETTIME_CLOCKID, &ts); in __time64() 63 *timer = ts.tv_sec; in __time64() 64 return ts.tv_sec; in __time64()
|
/sysdeps/mach/i386/ |
A D | thread_state.h | 36 #define MACHINE_THREAD_STATE_FIX_NEW(ts) do { \ argument 37 asm ("mov %%cs, %w0" : "=q" ((ts)->cs)); \ 38 asm ("mov %%ds, %w0" : "=q" ((ts)->ds)); \ 39 asm ("mov %%es, %w0" : "=q" ((ts)->es)); \ 40 asm ("mov %%fs, %w0" : "=q" ((ts)->fs)); \ 41 asm ("mov %%gs, %w0" : "=q" ((ts)->gs)); \
|
/sysdeps/mach/ |
A D | thread_state.h | 28 #define MACHINE_THREAD_STATE_SET_PC(ts, pc) \ argument 29 ((ts)->PC = (unsigned long int) (pc)) 33 #define MACHINE_THREAD_STATE_SET_SP(ts, stack, size) \ argument 34 ((ts)->SP = (unsigned long int) (stack)) 36 #define MACHINE_THREAD_STATE_SET_SP(ts, stack, size) \ argument 37 ((ts)->SP = (unsigned long int) (stack) + (size)) 44 # define MACHINE_THREAD_STATE_FIX_NEW(ts) argument
|
A D | clock_gettime.c | 27 __clock_gettime (clockid_t clock_id, struct timespec *ts) in __clock_gettime() argument 42 TIME_VALUE_TO_TIMESPEC (&tv, ts); in __clock_gettime() 76 TIME_VALUE_TO_TIMESPEC(&t, ts); in __clock_gettime() 96 TIME_VALUE_TO_TIMESPEC(&bi.user_time, ts); in __clock_gettime() 117 struct timespec ts; in __clock_gettime64() local 120 ret = __clock_gettime (clock_id, &ts); in __clock_gettime64() 122 *ts64 = valid_timespec_to_timespec64 (ts); in __clock_gettime64()
|
/sysdeps/mach/hurd/ |
A D | poll.c | 33 struct timespec ts, *to; in __poll() local 39 ts.tv_sec = timeout / 1000; in __poll() 40 ts.tv_nsec = (timeout % 1000) * 1000000; in __poll() 41 to = &ts; in __poll()
|