authorgravatar for justus@klausecker.deJustus Klausecker <justus@klausecker.de> 2026-02-23 17:07:47+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-02-23 21:13:26+01:00
log360bc28c9646ef6bcd6136f8a088930201e02012
tree3d36731bb90c91cded581dc1d5f1321be6a180a7
parentee82d926a646a25a5986591ade1f30e77eed0a34

fix cmpxchg behavior test

This has to be a `@cmpxchgStrong` instead of a `@cmpxchgWeak` otherwise this test will fail spuriously on LL/SC architectures like PowerPC.

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

test/behavior/atomics.zig+1-1
......@@ -143,7 +143,7 @@ test "cmpxchg on a global variable" {
143143 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
144144 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
145145
146 _ = @cmpxchgWeak(u32, &a_global_variable, 1234, 42, .acquire, .monotonic);
146 _ = @cmpxchgStrong(u32, &a_global_variable, 1234, 42, .acquire, .monotonic);
147147 try expect(a_global_variable == 42);
148148}
149149