~sircmpwn/hare-linux

580df287d780f061a4f3d0ff92eadae065d356b0 — Eyal Sawady 1 year, 10 months ago e2c199c
linux::io_uring::sqe: drop harec workaround

Signed-off-by: Eyal Sawady <ecs@d2evs.net>
2 files changed, 7 insertions(+), 9 deletions(-)

M io_uring/sqe.ha
M io_uring/uring.ha
M io_uring/sqe.ha => io_uring/sqe.ha +5 -5
@@ 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;
};

M io_uring/uring.ha => io_uring/uring.ha +2 -4
@@ 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,
			},