commit 8e30311e2d96b10a0d1218ccf08169dc8e9f1068
parent 41e0647cac28a39b61ce6bd7d6f62a3c5f1ae6ae
Author: Drew DeVault <sir@cmpwn.com>
Date: Sun, 23 May 2021 12:25:37 -0400
linux::io_uring: add offs to read/write
Signed-off-by: Drew DeVault <sir@cmpwn.com>
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/linux/io_uring/sqe.ha b/linux/io_uring/sqe.ha
@@ -68,10 +68,11 @@ export fn read(
fd: int,
buf: *void,
count: size,
+ offs: u64,
flags: flags...
) void = {
assert(count <= types::U32_MAX);
- preprw(sqe, op::READ, fd, buf, count: u32, 0, flags...);
+ preprw(sqe, op::READ, fd, buf, count: u32, offs, flags...);
};
// Prepares a write operation for an [[sqe]].
@@ -80,10 +81,11 @@ export fn write(
fd: int,
buf: *void,
count: size,
+ offs: u64,
flags: flags...
) void = {
assert(count <= types::U32_MAX);
- preprw(sqe, op::WRITE, fd, buf, count: u32, 0, flags...);
+ preprw(sqe, op::WRITE, fd, buf, count: u32, offs, flags...);
};
// Prepares a read for a fixed buffer previously registered with