authorgravatar for 18176443+jeffkdev@users.noreply.github.comjeffkdev <18176443+jeffkdev@users.noreply.github.com> 2026-05-05 11:50:30-04:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-05-06 15:47:04+02:00
loga2ab3132df50753f8cc403f072c2a8b5b950f20e
treeeb103db8ae497e362dd169cdea685761dcb2d6c3
parent73d20ecd6a558cde8a8341de3c348895a006f49c

wasm futex: fix invalid cast from u64 to i64


1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/Io/Threaded.zig+1-1
......@@ -956,7 +956,7 @@ const Thread = struct {
956956 comptime assert(builtin.cpu.has(.wasm, .atomics));
957957 // TODO implement cancelation for WASM futex waits by signaling the futex
958958 if (!uncancelable) try Thread.checkCancel();
959 const to: i64 = if (timeout_ns) |ns| ns else -1;
959 const to: i64 = if (timeout_ns) |ns| std.math.cast(i64, ns) orelse std.math.maxInt(i64) else -1;
960960 const signed_expect: i32 = @bitCast(expect);
961961 const result = asm volatile (
962962 \\local.get %[ptr]