Lines Matching refs:xt
149 static DWORD impl_xtime2msec(const xtime *xt) in impl_xtime2msec() argument
151 return (DWORD)((xt->sec * 1000U) + (xt->nsec / 1000000L)); in impl_xtime2msec()
209 static int impl_cond_do_wait(cnd_t *cond, mtx_t *mtx, const xtime *xt) in impl_cond_do_wait() argument
222 w = WaitForSingleObject(cond->sem_queue, xt ? impl_xtime2msec(xt) : INFINITE); in impl_cond_do_wait()
381 cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt) in cnd_timedwait() argument
383 if (!cond || !mtx || !xt) return thrd_error; in cnd_timedwait()
385 if (SleepConditionVariableCS(&cond->condvar, mtx, impl_xtime2msec(xt))) in cnd_timedwait()
389 return impl_cond_do_wait(cond, mtx, xt); in cnd_timedwait()
441 mtx_timedlock(mtx_t *mtx, const xtime *xt) in mtx_timedlock() argument
444 if (!mtx || !xt) return thrd_error; in mtx_timedlock()
446 expire += xt->sec; in mtx_timedlock()
578 thrd_sleep(const xtime *xt) in thrd_sleep() argument
580 assert(xt); in thrd_sleep()
581 Sleep(impl_xtime2msec(xt)); in thrd_sleep()
633 xtime_get(xtime *xt, int base) in xtime_get() argument
635 if (!xt) return 0; in xtime_get()
637 xt->sec = time(NULL); in xtime_get()
638 xt->nsec = 0; in xtime_get()