summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-02-06 09:56:46 -0700
committerJens Axboe <axboe@kernel.dk>2020-02-06 09:56:46 -0700
commite2bf67f5d115f1895d74f1ea33b850c082afbe26 (patch)
tree77592b29c6c4c74bfd72741500aeb7e2a1d4a877
parente75144f6d048379261d56f4972c3cb6210cda690 (diff)
downloadliburing-e2bf67f5d115f1895d74f1ea33b850c082afbe26.tar.gz
liburing-e2bf67f5d115f1895d74f1ea33b850c082afbe26.tar.bz2
Add io_uring_prep_epoll_ctl() helper
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-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 44f18fd..b549ea7 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -405,6 +405,14 @@ static inline void io_uring_prep_openat2(struct io_uring_sqe *sqe, int dfd,
(uint64_t) (uintptr_t) how);
}
+struct epoll_event;
+static inline void io_uring_prep_epoll_ctl(struct io_uring_sqe *sqe, int epfd,
+ int fd, int op,
+ struct epoll_event *ev)
+{
+ io_uring_prep_rw(IORING_OP_EPOLL_CTL, sqe, epfd, ev, op, fd);
+}
+
static inline unsigned io_uring_sq_ready(struct io_uring *ring)
{
return ring->sq.sqe_tail - ring->sq.sqe_head;