mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 01:04:43 +01:00
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.
This commit is contained in:
parent
ee82d926a6
commit
360bc28c96
1 changed files with 1 additions and 1 deletions
|
|
@ -143,7 +143,7 @@ test "cmpxchg on a global variable" {
|
|||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
|
||||
_ = @cmpxchgWeak(u32, &a_global_variable, 1234, 42, .acquire, .monotonic);
|
||||
_ = @cmpxchgStrong(u32, &a_global_variable, 1234, 42, .acquire, .monotonic);
|
||||
try expect(a_global_variable == 42);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue