authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-27 19:07:55+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-27 23:24:37+01:00
log6cf01a679f1950f1393d9245048a62500e3869c1
treed80667b6bdd3ffe635aa18409a332413b093d7f5
parentd16a9b0acb14ad217849de2a59d91cd4648ac1a7

std.Thread.Futex: Mark inline asm volatile in WasmImpl.

Closes #22082.

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

lib/std/Thread/Futex.zig+2-2
...@@ -465,7 +465,7 @@ const WasmImpl = struct {...@@ -465,7 +465,7 @@ const WasmImpl = struct {
465 @compileError("WASI target missing cpu feature 'atomics'");465 @compileError("WASI target missing cpu feature 'atomics'");
466 }466 }
467 const to: i64 = if (timeout) |to| @intCast(to) else -1;467 const to: i64 = if (timeout) |to| @intCast(to) else -1;
468 const result = asm (468 const result = asm volatile (
469 \\local.get %[ptr]469 \\local.get %[ptr]
470 \\local.get %[expected]470 \\local.get %[expected]
471 \\local.get %[timeout]471 \\local.get %[timeout]
...@@ -489,7 +489,7 @@ const WasmImpl = struct {...@@ -489,7 +489,7 @@ const WasmImpl = struct {
489 @compileError("WASI target missing cpu feature 'atomics'");489 @compileError("WASI target missing cpu feature 'atomics'");
490 }490 }
491 assert(max_waiters != 0);491 assert(max_waiters != 0);
492 const woken_count = asm (492 const woken_count = asm volatile (
493 \\local.get %[ptr]493 \\local.get %[ptr]
494 \\local.get %[waiters]494 \\local.get %[waiters]
495 \\memory.atomic.notify 0495 \\memory.atomic.notify 0