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

Function __umtx_op_sem_wait

freebsd/kern/kern_umtx.c:3753–3771  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3751
3752#if defined(COMPAT_FREEBSD9) || defined(COMPAT_FREEBSD10)
3753static int
3754__umtx_op_sem_wait(struct thread *td, struct _umtx_op_args *uap,
3755 const struct umtx_copyops *ops)
3756{
3757 struct _umtx_time *tm_p, timeout;
3758 int error;
3759
3760 /* Allow a null timespec (wait forever). */
3761 if (uap->uaddr2 == NULL)
3762 tm_p = NULL;
3763 else {
3764 error = ops->copyin_umtx_time(
3765 uap->uaddr2, (size_t)uap->uaddr1, &timeout);
3766 if (error != 0)
3767 return (error);
3768 tm_p = &timeout;
3769 }
3770 return (do_sem_wait(td, uap->obj, tm_p));
3771}
3772
3773static int
3774__umtx_op_sem_wake(struct thread *td, struct _umtx_op_args *uap,

Callers

nothing calls this directly

Calls 1

do_sem_waitFunction · 0.85

Tested by

no test coverage detected