| 3751 | |
| 3752 | #if defined(COMPAT_FREEBSD9) || defined(COMPAT_FREEBSD10) |
| 3753 | static 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 | |
| 3773 | static int |
| 3774 | __umtx_op_sem_wake(struct thread *td, struct _umtx_op_args *uap, |
nothing calls this directly
no test coverage detected