commit ba9ca5271ee6e4d2cd77bca58f72c937aea6e56c
parent ab262e8afc9a8519cfcc0fe87a3f8951d070f26e
Author: Eyal Sawady <ecs@d2evs.net>
Date: Thu, 13 Jan 2022 14:01:26 +0000
linux::io_uring::sqe: drop harec workaround
Signed-off-by: Eyal Sawady <ecs@d2evs.net>
Diffstat:
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/linux/io_uring/sqe.ha b/linux/io_uring/sqe.ha
@@ -38,7 +38,7 @@ export fn set_user(sqe: *sqe, user_data: *void) void = {
// retrieve the buffer used from the corresponding [[cqe]].
export fn set_buffer_select(sqe: *sqe, group: u16) void = {
sqe.flags |= flags::BUFFER_SELECT;
- sqe.extras.buffers.buf_group = group;
+ sqe.buf_group = group;
};
// Prepares a no-op "operation" for an [[sqe]].
@@ -109,7 +109,7 @@ export fn read_fixed(
) void = {
assert(count <= types::U32_MAX);
preprw(sqe, op::READ_FIXED, fd, buf, count: u32, 0, flags...);
- sqe.extras.buffers.buf_index = index;
+ sqe.buf_index = index;
};
// Prepares a write for a fixed buffer previously registered with
@@ -125,7 +125,7 @@ export fn write_fixed(
) void = {
assert(count <= types::U32_MAX);
preprw(sqe, op::WRITE_FIXED, fd, buf, count: u32, 0, flags...);
- sqe.extras.buffers.buf_index = index;
+ sqe.buf_index = index;
};
// Prepares an fsync operation for an [[sqe]]. Note that operations are executed
@@ -327,7 +327,7 @@ export fn provide_buffers(
assert(len(pool) == nbuf * bufsz);
preprw(sqe, op::PROVIDE_BUFFERS, nbuf: int, pool: *[*]u8,
bufsz: uint, bufid: uint, flags...);
- sqe.extras.buffers.buf_group = group;
+ sqe.buf_group = group;
};
// Removes buffers previously registered with [[provide_buffers]].
@@ -338,5 +338,5 @@ export fn remove_buffers(
flags: flags...
) void = {
preprw(sqe, op::REMOVE_BUFFERS, nbuf: int, null, 0, 0, flags...);
- sqe.extras.buffers.buf_group = group;
+ sqe.buf_group = group;
};
diff --git a/linux/io_uring/uring.ha b/linux/io_uring/uring.ha
@@ -142,11 +142,9 @@ export type sqe = struct {
splice_flags: splice_flags,
},
user_data: u64,
- // TODO: Remove the names on these embedded types
- // See https://todo.sr.ht/~sircmpwn/hare/493
union {
- extras: struct {
- buffers: union {
+ struct {
+ union {
buf_index: u16,
buf_group: u16,
},