summaryrefslogtreecommitdiff
path: root/src/include/liburing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/liburing.h')
-rw-r--r--src/include/liburing.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index d7a2bc2..4e89a8a 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -270,6 +270,14 @@ static inline void io_uring_prep_timeout_remove(struct io_uring_sqe *sqe,
sqe->timeout_flags = flags;
}
+static inline void io_uring_prep_accept(struct io_uring_sqe *sqe, int fd,
+ struct sockaddr *addr,
+ socklen_t *addrlen, int flags)
+{
+ io_uring_prep_rw(IORING_OP_ACCEPT, sqe, fd, addr, 0, (__u64) addrlen);
+ sqe->accept_flags = flags;
+}
+
static inline unsigned io_uring_sq_space_left(struct io_uring *ring)
{
return *ring->sq.kring_entries - (ring->sq.sqe_tail - ring->sq.sqe_head);