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

Function freebsd32_kmq_timedreceive

freebsd/kern/uipc_mqueue.c:2828–2857  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2826}
2827
2828int
2829freebsd32_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);
2854out:
2855 fdrop(fp, td);
2856 return (error);
2857}
2858
2859int
2860freebsd32_kmq_notify(struct thread *td, struct freebsd32_kmq_notify_args *uap)

Callers

nothing calls this directly

Calls 3

getmq_readFunction · 0.85
mqueue_receiveFunction · 0.85
copyinFunction · 0.50

Tested by

no test coverage detected