diff --git a/lib/std/Io/Uring.zig b/lib/std/Io/Uring.zig index 59d932311384d4e3de96ef51d618e61338e4783c..58d97dc0e8e090c84bec204f74be93a8bd5e5c37 100644 --- a/lib/std/Io/Uring.zig +++ b/lib/std/Io/Uring.zig @@ -1135,8 +1135,9 @@ fn mainIdleEntry() callconv(.naked) void { fn mainIdle( ev: *Evented, - message: *const SwitchMessage, + contexts: *const Io.fiber.Switch, ) callconv(.withStackAlign(.c, @max(@alignOf(Thread), @alignOf(Io.fiber.Context)))) noreturn { + const message: *const SwitchMessage = @fieldParentPtr("contexts", contexts); message.handle(ev); ev.idle(&ev.threads.allocated[0]); ev.yield(@ptrCast(&ev.main_fiber_buffer), .nothing); @@ -1414,8 +1415,9 @@ const AsyncClosure = struct { fn call( closure: *AsyncClosure, - message: *const SwitchMessage, + contexts: *const Io.fiber.Switch, ) callconv(.withStackAlign(.c, @alignOf(AsyncClosure))) noreturn { + const message: *const SwitchMessage = @fieldParentPtr("contexts", contexts); const ev = closure.evented; const fiber = closure.fiber; message.handle(ev); @@ -1779,8 +1781,9 @@ const Group = struct { fn call( closure: *Group.AsyncClosure, - message: *const SwitchMessage, + contexts: *const Io.fiber.Switch, ) callconv(.withStackAlign(.c, @alignOf(Group.AsyncClosure))) noreturn { + const message: *const SwitchMessage = @fieldParentPtr("contexts", contexts); const ev = closure.evented; const fiber = closure.fiber; message.handle(ev);