From 6cf01a679f1950f1393d9245048a62500e3869c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 27 Nov 2024 19:07:55 +0100 Subject: [PATCH] std.Thread.Futex: Mark inline asm volatile in WasmImpl. Closes #22082. --- lib/std/Thread/Futex.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/Thread/Futex.zig b/lib/std/Thread/Futex.zig index da3fb916c6..fc02b8407c 100644 --- a/lib/std/Thread/Futex.zig +++ b/lib/std/Thread/Futex.zig @@ -465,7 +465,7 @@ const WasmImpl = struct { @compileError("WASI target missing cpu feature 'atomics'"); } const to: i64 = if (timeout) |to| @intCast(to) else -1; - const result = asm ( + const result = asm volatile ( \\local.get %[ptr] \\local.get %[expected] \\local.get %[timeout] @@ -489,7 +489,7 @@ const WasmImpl = struct { @compileError("WASI target missing cpu feature 'atomics'"); } assert(max_waiters != 0); - const woken_count = asm ( + const woken_count = asm volatile ( \\local.get %[ptr] \\local.get %[waiters] \\memory.atomic.notify 0