forked from ziglang/zig
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
std.builtin: make atomic order fields lowercase
- Loading branch information
1 parent
455b58e
commit 9e21a8d
Showing
9 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
compile_errors/atomic_orderings_of_atomicStore_Acquire_or_AcqRel.zig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
export fn entry() void { | ||
var x: u32 = 0; | ||
@atomicStore(u32, &x, 1, .Acquire); | ||
@atomicStore(u32, &x, 1, .acquire); | ||
} | ||
|
||
// error | ||
// backend=stage2 | ||
// target=native | ||
// | ||
// :3:31: error: @atomicStore atomic ordering must not be Acquire or AcqRel | ||
// :3:31: error: @atomicStore atomic ordering must not be acquire or acq_rel |
2 changes: 1 addition & 1 deletion
2
compile_errors/atomic_orderings_of_cmpxchg-failure_stricter_than_success.zig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
compile_errors/atomic_orderings_of_cmpxchg-success_Monotonic_or_stricter.zig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
const AtomicOrder = @import("std").builtin.AtomicOrder; | ||
export fn f() void { | ||
var x: i32 = 1234; | ||
while (!@cmpxchgWeak(i32, &x, 1234, 5678, AtomicOrder.Unordered, AtomicOrder.Unordered)) {} | ||
while (!@cmpxchgWeak(i32, &x, 1234, 5678, AtomicOrder.unordered, AtomicOrder.unordered)) {} | ||
} | ||
|
||
// error | ||
// backend=stage2 | ||
// target=native | ||
// | ||
// :4:58: error: success atomic ordering must be Monotonic or stricter | ||
// :4:58: error: success atomic ordering must be monotonic or stricter |
4 changes: 2 additions & 2 deletions
4
compile_errors/atomic_orderings_of_fence_Acquire_or_stricter.zig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
export fn entry() void { | ||
@fence(.Monotonic); | ||
@fence(.monotonic); | ||
} | ||
|
||
// error | ||
// backend=stage2 | ||
// target=native | ||
// | ||
// :2:13: error: atomic ordering must be Acquire or stricter | ||
// :2:13: error: atomic ordering must be acquire or stricter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
compile_errors/atomicrmw_with_float_op_not_.Xchg_.Add_.Sub_.Max_or_.Min.zig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
compile_errors/passing_a_not-aligned-enough_pointer_to_cmpxchg.zig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters