authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2024-03-15 02:28:50-04:00
committergravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2024-03-15 02:28:50-04:00
log5ce40e61c6f5c05925aa5116cc6c61fbae8a6263
treec2bdea1b2eeb0b2e9d551e6e5621390739818e3a
parentcf4a2099e1e3c600ee65628153a280f5b2cd51fd
signaturelock-open Commit is signed but in an unrecognized format.

bsd: debitrot AtomicOrder renames

- complete std.builtin.AtomicOrder renames that were missed from 6067d39522f

6 files changed, 15 insertions(+), 15 deletions(-)

lib/compiler_rt/emutls.zig+2-2
...@@ -246,7 +246,7 @@ const emutls_control = extern struct {...@@ -246,7 +246,7 @@ const emutls_control = extern struct {
246 // Two threads could race against the same emutls_control.246 // Two threads could race against the same emutls_control.
247247
248 // Use atomic for reading coherent value lockless.248 // Use atomic for reading coherent value lockless.
249 const index_lockless = @atomicLoad(usize, &self.object.index, .Acquire);249 const index_lockless = @atomicLoad(usize, &self.object.index, .acquire);
250250
251 if (index_lockless != 0) {251 if (index_lockless != 0) {
252 // index is already initialized, return it.252 // index is already initialized, return it.
...@@ -264,7 +264,7 @@ const emutls_control = extern struct {...@@ -264,7 +264,7 @@ const emutls_control = extern struct {
264 }264 }
265265
266 // Store a new index atomically (for having coherent index_lockless reading).266 // Store a new index atomically (for having coherent index_lockless reading).
267 @atomicStore(usize, &self.object.index, emutls_control.next_index, .Release);267 @atomicStore(usize, &self.object.index, emutls_control.next_index, .release);
268268
269 // Increment the next available index269 // Increment the next available index
270 emutls_control.next_index += 1;270 emutls_control.next_index += 1;
lib/std/Thread/Futex.zig+4-4
...@@ -801,7 +801,7 @@ const PosixImpl = struct {...@@ -801,7 +801,7 @@ const PosixImpl = struct {
801 assert(std.c.pthread_mutex_lock(&bucket.mutex) == .SUCCESS);801 assert(std.c.pthread_mutex_lock(&bucket.mutex) == .SUCCESS);
802 defer assert(std.c.pthread_mutex_unlock(&bucket.mutex) == .SUCCESS);802 defer assert(std.c.pthread_mutex_unlock(&bucket.mutex) == .SUCCESS);
803803
804 cancelled = ptr.load(.Monotonic) != expect;804 cancelled = ptr.load(.monotonic) != expect;
805 if (cancelled) {805 if (cancelled) {
806 return;806 return;
807 }807 }
...@@ -855,14 +855,14 @@ const PosixImpl = struct {...@@ -855,14 +855,14 @@ const PosixImpl = struct {
855 // The pending count increment in wait() must also now use seq_cst for the update + this pending load855 // The pending count increment in wait() must also now use seq_cst for the update + this pending load
856 // to be in the same modification order as our load isn't using release/acquire to guarantee it.856 // to be in the same modification order as our load isn't using release/acquire to guarantee it.
857 bucket.pending.fence(.seq_cst);857 bucket.pending.fence(.seq_cst);
858 if (bucket.pending.load(.Monotonic) == 0) {858 if (bucket.pending.load(.monotonic) == 0) {
859 return;859 return;
860 }860 }
861861
862 // Keep a list of all the waiters notified and wake then up outside the mutex critical section.862 // Keep a list of all the waiters notified and wake then up outside the mutex critical section.
863 var notified = WaitList{};863 var notified = WaitList{};
864 defer if (notified.len > 0) {864 defer if (notified.len > 0) {
865 const pending = bucket.pending.fetchSub(notified.len, .Monotonic);865 const pending = bucket.pending.fetchSub(notified.len, .monotonic);
866 assert(pending >= notified.len);866 assert(pending >= notified.len);
867867
868 while (notified.pop()) |waiter| {868 while (notified.pop()) |waiter| {
...@@ -875,7 +875,7 @@ const PosixImpl = struct {...@@ -875,7 +875,7 @@ const PosixImpl = struct {
875 defer assert(std.c.pthread_mutex_unlock(&bucket.mutex) == .SUCCESS);875 defer assert(std.c.pthread_mutex_unlock(&bucket.mutex) == .SUCCESS);
876876
877 // Another pending check again to avoid the WaitQueue lookup if not necessary.877 // Another pending check again to avoid the WaitQueue lookup if not necessary.
878 if (bucket.pending.load(.Monotonic) > 0) {878 if (bucket.pending.load(.monotonic) > 0) {
879 notified = WaitQueue.remove(&bucket.treap, address, max_waiters);879 notified = WaitQueue.remove(&bucket.treap, address, max_waiters);
880 }880 }
881 }881 }
lib/std/Thread/RwLock.zig+1-1
...@@ -375,5 +375,5 @@ test "concurrent access" {...@@ -375,5 +375,5 @@ test "concurrent access" {
375375
376 try testing.expectEqual(num_writes, runner.writes);376 try testing.expectEqual(num_writes, runner.writes);
377377
378 //std.debug.print("reads={}\n", .{ runner.reads.load(.Unordered)});378 //std.debug.print("reads={}\n", .{ runner.reads.load(.unordered)});
379}379}
lib/std/atomic.zig+1-1
...@@ -159,7 +159,7 @@ test Value {...@@ -159,7 +159,7 @@ test Value {
159 // acquire ensures count decrement and code before159 // acquire ensures count decrement and code before
160 // previous unrefs()s happens-before we call dropFn160 // previous unrefs()s happens-before we call dropFn
161 // below.161 // below.
162 // Another alternative is to use .AcqRel on the162 // Another alternative is to use .acq_rel on the
163 // fetchSub count decrement but it's extra barrier in163 // fetchSub count decrement but it's extra barrier in
164 // possibly hot path.164 // possibly hot path.
165 rc.count.fence(.acquire);165 rc.count.fence(.acquire);
src/Air.zig+3-3
...@@ -727,11 +727,11 @@ pub const Inst = struct {...@@ -727,11 +727,11 @@ pub const Inst = struct {
727 /// Result type is always `void`.727 /// Result type is always `void`.
728 /// Uses the `bin_op` field. LHS is pointer, RHS is element.728 /// Uses the `bin_op` field. LHS is pointer, RHS is element.
729 atomic_store_unordered,729 atomic_store_unordered,
730 /// Same as `atomic_store_unordered` but with `AtomicOrder.Monotonic`.730 /// Same as `atomic_store_unordered` but with `AtomicOrder.monotonic`.
731 atomic_store_monotonic,731 atomic_store_monotonic,
732 /// Same as `atomic_store_unordered` but with `AtomicOrder.Release`.732 /// Same as `atomic_store_unordered` but with `AtomicOrder.release`.
733 atomic_store_release,733 atomic_store_release,
734 /// Same as `atomic_store_unordered` but with `AtomicOrder.SeqCst`.734 /// Same as `atomic_store_unordered` but with `AtomicOrder.seq_cst`.
735 atomic_store_seq_cst,735 atomic_store_seq_cst,
736 /// Atomically read-modify-write via a pointer.736 /// Atomically read-modify-write via a pointer.
737 /// Result type is the element type of the pointer.737 /// Result type is the element type of the pointer.
src/arch/sparc64/CodeGen.zig+4-4
...@@ -647,10 +647,10 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {...@@ -647,10 +647,10 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
647 .call_never_tail => try self.airCall(inst, .never_tail),647 .call_never_tail => try self.airCall(inst, .never_tail),
648 .call_never_inline => try self.airCall(inst, .never_inline),648 .call_never_inline => try self.airCall(inst, .never_inline),
649649
650 .atomic_store_unordered => @panic("TODO try self.airAtomicStore(inst, .Unordered)"),650 .atomic_store_unordered => @panic("TODO try self.airAtomicStore(inst, .unordered)"),
651 .atomic_store_monotonic => @panic("TODO try self.airAtomicStore(inst, .Monotonic)"),651 .atomic_store_monotonic => @panic("TODO try self.airAtomicStore(inst, .monotonic)"),
652 .atomic_store_release => @panic("TODO try self.airAtomicStore(inst, .Release)"),652 .atomic_store_release => @panic("TODO try self.airAtomicStore(inst, .release)"),
653 .atomic_store_seq_cst => @panic("TODO try self.airAtomicStore(inst, .SeqCst)"),653 .atomic_store_seq_cst => @panic("TODO try self.airAtomicStore(inst, .seq_cst)"),
654654
655 .struct_field_ptr_index_0 => try self.airStructFieldPtrIndex(inst, 0),655 .struct_field_ptr_index_0 => try self.airStructFieldPtrIndex(inst, 0),
656 .struct_field_ptr_index_1 => try self.airStructFieldPtrIndex(inst, 1),656 .struct_field_ptr_index_1 => try self.airStructFieldPtrIndex(inst, 1),