From c3101fb46602b06a541969b9ea5c486027d7e8bc Mon Sep 17 00:00:00 2001 From: Eyal Sawady Date: Thu, 13 Jan 2022 14:01:26 +0000 Subject: [PATCH] linux::io_uring::sqe: drop harec workaround Signed-off-by: Eyal Sawady --- io_uring/sqe.ha | 10 +++++----- io_uring/uring.ha | 6 ++---- diff --git a/io_uring/sqe.ha b/io_uring/sqe.ha index 42463b736d892a053da93b9ab911261f4507bb58..d5926d5bfc7f07d5b03275cf0e2480a2ece932d9 100644 --- a/io_uring/sqe.ha +++ b/io_uring/sqe.ha @@ -38,7 +38,7 @@ // [[provide_buffers]] for configuring buffer groups, and [[get_buffer_id]] to // 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 @@ flags: flags... ) 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 @@ flags: flags... ) 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 @@ ) void = { 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 @@ group: u16, 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/io_uring/uring.ha b/io_uring/uring.ha index fb02fb59d20bed8023ab56252f776d51003d8d06..6bf98a6e68e1d3b7dd28701d338ed5efaaa4ef3e 100644 --- a/io_uring/uring.ha +++ b/io_uring/uring.ha @@ -142,11 +142,9 @@ fadvise_advice: u32, 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, }, -- 2.48.1