summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/liburing.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/liburing.h b/src/liburing.h
index 8c81978..d6589f6 100644
--- a/src/liburing.h
+++ b/src/liburing.h
@@ -56,4 +56,10 @@ extern int io_uring_wait_completion(int fd, struct io_uring_cq *cq,
extern int io_uring_submit(int fd, struct io_uring_sq *sq);
extern struct io_uring_iocb *io_uring_get_iocb(struct io_uring_sq *sq);
+static inline struct io_uring_iocb *
+io_uring_iocb_from_ev(struct io_uring_sq *sq, struct io_uring_event *ev)
+{
+ return &sq->iocbs[ev->index];
+}
+
#endif