summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-10-21 08:55:44 -0600
committerJens Axboe <axboe@kernel.dk>2021-10-21 08:55:44 -0600
commit56cd4af3f8c536e9366efc70e499b4c3e8695476 (patch)
treea2d3abd199c75ed7d0cfd3caa90c8f9e9ab8a053
parenta50c471578158b4c5d85cefbdbaed61296159eac (diff)
parentc1c92fd4600f8a257992a02dc5767abdfc151964 (diff)
downloadliburing-56cd4af3f8c536e9366efc70e499b4c3e8695476.tar.gz
liburing-56cd4af3f8c536e9366efc70e499b4c3e8695476.tar.bz2
Merge branch 'pr2' of https://github.com/romange/liburing
* 'pr2' of https://github.com/romange/liburing: Add io_uring_prep_readv2 and io_uring_prep_writev2 helpers
-rw-r--r--src/include/liburing.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index 99f4f37..fc81542 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -312,6 +312,14 @@ static inline void io_uring_prep_readv(struct io_uring_sqe *sqe, int fd,
io_uring_prep_rw(IORING_OP_READV, sqe, fd, iovecs, nr_vecs, offset);
}
+static inline void io_uring_prep_readv2(struct io_uring_sqe *sqe, int fd,
+ const struct iovec *iovecs,
+ unsigned nr_vecs, __u64 offset, int flags)
+{
+ io_uring_prep_readv(sqe, fd, iovecs, nr_vecs, offset);
+ sqe->rw_flags = flags;
+}
+
static inline void io_uring_prep_read_fixed(struct io_uring_sqe *sqe, int fd,
void *buf, unsigned nbytes,
__u64 offset, int buf_index)
@@ -327,6 +335,14 @@ static inline void io_uring_prep_writev(struct io_uring_sqe *sqe, int fd,
io_uring_prep_rw(IORING_OP_WRITEV, sqe, fd, iovecs, nr_vecs, offset);
}
+static inline void io_uring_prep_writev2(struct io_uring_sqe *sqe, int fd,
+ const struct iovec *iovecs,
+ unsigned nr_vecs, __u64 offset, int flags)
+{
+ io_uring_prep_writev(sqe, fd, iovecs, nr_vecs, offset);
+ sqe->rw_flags = flags;
+}
+
static inline void io_uring_prep_write_fixed(struct io_uring_sqe *sqe, int fd,
const void *buf, unsigned nbytes,
__u64 offset, int buf_index)