| author | |
| committer | |
| log | 360bc28c9646ef6bcd6136f8a088930201e02012 |
| tree | 3d36731bb90c91cded581dc1d5f1321be6a180a7 |
| parent | ee82d926a646a25a5986591ade1f30e77eed0a34 |
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" { |
| 143 | 143 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 144 | 144 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; |
| 145 | 145 | |
| 146 | _ = @cmpxchgWeak(u32, &a_global_variable, 1234, 42, .acquire, .monotonic); | |
| 146 | _ = @cmpxchgStrong(u32, &a_global_variable, 1234, 42, .acquire, .monotonic); | |
| 147 | 147 | try expect(a_global_variable == 42); |
| 148 | 148 | } |
| 149 | 149 |