| 2826 | } |
| 2827 | |
| 2828 | int |
| 2829 | freebsd32_kmq_timedreceive(struct thread *td, |
| 2830 | struct freebsd32_kmq_timedreceive_args *uap) |
| 2831 | { |
| 2832 | struct mqueue *mq; |
| 2833 | struct file *fp; |
| 2834 | struct timespec32 ets32; |
| 2835 | struct timespec *abs_timeout, ets; |
| 2836 | int error, waitok; |
| 2837 | |
| 2838 | AUDIT_ARG_FD(uap->mqd); |
| 2839 | error = getmq_read(td, uap->mqd, &fp, NULL, &mq); |
| 2840 | if (error) |
| 2841 | return (error); |
| 2842 | if (uap->abs_timeout != NULL) { |
| 2843 | error = copyin(uap->abs_timeout, &ets32, sizeof(ets32)); |
| 2844 | if (error != 0) |
| 2845 | goto out; |
| 2846 | CP(ets32, ets, tv_sec); |
| 2847 | CP(ets32, ets, tv_nsec); |
| 2848 | abs_timeout = &ets; |
| 2849 | } else |
| 2850 | abs_timeout = NULL; |
| 2851 | waitok = !(fp->f_flag & O_NONBLOCK); |
| 2852 | error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, |
| 2853 | uap->msg_prio, waitok, abs_timeout); |
| 2854 | out: |
| 2855 | fdrop(fp, td); |
| 2856 | return (error); |
| 2857 | } |
| 2858 | |
| 2859 | int |
| 2860 | freebsd32_kmq_notify(struct thread *td, struct freebsd32_kmq_notify_args *uap) |
nothing calls this directly
no test coverage detected