diff options
-rw-r--r-- | src/liburing.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/liburing.h b/src/liburing.h index 5c8b01a..cd098ce 100644 --- a/src/liburing.h +++ b/src/liburing.h @@ -3,6 +3,7 @@ #include <sys/uio.h> #include <signal.h> +#include <inttypes.h> #include "compat.h" #include "io_uring.h" @@ -74,6 +75,11 @@ static inline void io_uring_sqe_set_data(struct io_uring_sqe *sqe, void *data) sqe->user_data = (unsigned long) data; } +static inline void *io_uring_cqe_get_data(struct io_uring_cqe *cqe) +{ + return (void *) (uintptr_t) cqe->user_data; +} + static inline void io_uring_prep_rw(int op, struct io_uring_sqe *sqe, int fd, void *addr, unsigned len, off_t offset) { |