@@ -416,6 +416,14 @@ static inline void io_uring_prep_recvmsg(struct io_uring_sqe *sqe, int fd,
sqe->msg_flags = flags;
}
+static inline void io_uring_prep_recvmsg_multishot(struct io_uring_sqe *sqe,
+ int fd, struct msghdr *msg,
+ unsigned flags)
+{
+ io_uring_prep_recvmsg(sqe, fd, msg, flags);
+ sqe->ioprio |= IORING_RECV_MULTISHOT;
+}
+
static inline void io_uring_prep_sendmsg(struct io_uring_sqe *sqe, int fd,
const struct msghdr *msg,
unsigned flags)
@@ -674,6 +682,14 @@ static inline void io_uring_prep_recv(struct io_uring_sqe *sqe, int sockfd,
sqe->msg_flags = (__u32) flags;
}
+static inline void io_uring_prep_recv_multishot(struct io_uring_sqe *sqe,
+ int sockfd, void *buf,
+ size_t len, int flags)
+{
+ io_uring_prep_recv(sqe, sockfd, buf, len, flags);
+ sqe->ioprio |= IORING_RECV_MULTISHOT;
+}
+
static inline void io_uring_prep_openat2(struct io_uring_sqe *sqe, int dfd,
const char *path, struct open_how *how)
{
Add a nice API for multishot recv and recvmsg. Signed-off-by: Dylan Yudaken <dylany@fb.com> --- src/include/liburing.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)