Lines Matching refs:to
75 static int futex_get_abs_timeout(clockid_t clockid, struct timespec *to, in futex_get_abs_timeout() argument
78 if (clock_gettime(clockid, to)) { in futex_get_abs_timeout()
83 to->tv_nsec += timeout_ns; in futex_get_abs_timeout()
85 if (to->tv_nsec >= 1000000000) { in futex_get_abs_timeout()
86 to->tv_sec++; in futex_get_abs_timeout()
87 to->tv_nsec -= 1000000000; in futex_get_abs_timeout()
97 struct timespec to; in main() local
136 to.tv_sec = 0; in main()
137 to.tv_nsec = timeout_ns; in main()
139 res = futex_wait(&f1, f1, &to, 0); in main()
143 if (futex_get_abs_timeout(CLOCK_REALTIME, &to, timeout_ns)) in main()
145 res = futex_wait_bitset(&f1, f1, &to, 1, FUTEX_CLOCK_REALTIME); in main()
149 if (futex_get_abs_timeout(CLOCK_MONOTONIC, &to, timeout_ns)) in main()
151 res = futex_wait_bitset(&f1, f1, &to, 1, 0); in main()
155 if (futex_get_abs_timeout(CLOCK_REALTIME, &to, timeout_ns)) in main()
157 res = futex_wait_requeue_pi(&f1, f1, &futex_pi, &to, FUTEX_CLOCK_REALTIME); in main()
161 if (futex_get_abs_timeout(CLOCK_MONOTONIC, &to, timeout_ns)) in main()
163 res = futex_wait_requeue_pi(&f1, f1, &futex_pi, &to, 0); in main()
176 if (futex_get_abs_timeout(CLOCK_REALTIME, &to, timeout_ns)) in main()
178 res = futex_lock_pi(&futex_pi, &to, 0, 0); in main()
186 if (futex_get_abs_timeout(CLOCK_MONOTONIC, &to, timeout_ns)) in main()
188 res = futex_waitv(&waitv, 1, 0, &to, CLOCK_MONOTONIC); in main()
192 if (futex_get_abs_timeout(CLOCK_REALTIME, &to, timeout_ns)) in main()
194 res = futex_waitv(&waitv, 1, 0, &to, CLOCK_REALTIME); in main()