Add io_uring_cqe_get_data()
Add uintptr_t cast to avoid 32-bit warnings.
#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)
{
