| ... | @@ -956,7 +956,7 @@ const Thread = struct { | ... | @@ -956,7 +956,7 @@ const Thread = struct { |
| 956 | comptime assert(builtin.cpu.has(.wasm, .atomics)); | 956 | comptime assert(builtin.cpu.has(.wasm, .atomics)); |
| 957 | // TODO implement cancelation for WASM futex waits by signaling the futex | 957 | // TODO implement cancelation for WASM futex waits by signaling the futex |
| 958 | if (!uncancelable) try Thread.checkCancel(); | 958 | 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; |
| 960 | const signed_expect: i32 = @bitCast(expect); | 960 | const signed_expect: i32 = @bitCast(expect); |
| 961 | const result = asm volatile ( | 961 | const result = asm volatile ( |
| 962 | \\local.get %[ptr] | 962 | \\local.get %[ptr] |