MCPcopy Create free account
hub / github.com/F-Stack/f-stack / abs_timeout_init

Function abs_timeout_init

freebsd/kern/kern_umtx.c:743–766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

741}
742
743static void
744abs_timeout_init(struct abs_timeout *timo, int clockid, int absolute,
745 const struct timespec *timeout)
746{
747
748 timo->clockid = clockid;
749 if (!absolute) {
750 timo->is_abs_real = false;
751 abs_timeout_update(timo);
752 timespecadd(&timo->cur, timeout, &timo->end);
753 } else {
754 timo->end = *timeout;
755 timo->is_abs_real = clockid == CLOCK_REALTIME ||
756 clockid == CLOCK_REALTIME_FAST ||
757 clockid == CLOCK_REALTIME_PRECISE;
758 /*
759 * If is_abs_real, umtxq_sleep will read the clock
760 * after setting td_rtcgen; otherwise, read it here.
761 */
762 if (!timo->is_abs_real) {
763 abs_timeout_update(timo);
764 }
765 }
766}
767
768static void
769abs_timeout_init2(struct abs_timeout *timo, const struct _umtx_time *umtxtime)

Callers 2

abs_timeout_init2Function · 0.85
do_cv_waitFunction · 0.85

Calls 1

abs_timeout_updateFunction · 0.85

Tested by

no test coverage detected