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 {
246246 // Two threads could race against the same emutls_control.
247247
248248 // 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
251251 if (index_lockless != 0) {
252252 // index is already initialized, return it.
......@@ -264,7 +264,7 @@ const emutls_control = extern struct {
264264 }
265265
266266 // 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
269269 // Increment the next available index
270270 emutls_control.next_index += 1;
lib/std/Thread/Futex.zig+4-4
......@@ -801,7 +801,7 @@ const PosixImpl = struct {
801801 assert(std.c.pthread_mutex_lock(&bucket.mutex) == .SUCCESS);
802802 defer assert(std.c.pthread_mutex_unlock(&bucket.mutex) == .SUCCESS);
803803
804 cancelled = ptr.load(.Monotonic) != expect;
804 cancelled = ptr.load(.monotonic) != expect;
805805 if (cancelled) {
806806 return;
807807 }
......@@ -855,14 +855,14 @@ const PosixImpl = struct {
855855 // The pending count increment in wait() must also now use seq_cst for the update + this pending load
856856 // to be in the same modification order as our load isn't using release/acquire to guarantee it.
857857 bucket.pending.fence(.seq_cst);
858 if (bucket.pending.load(.Monotonic) == 0) {
858 if (bucket.pending.load(.monotonic) == 0) {
859859 return;
860860 }
861861
862862 // Keep a list of all the waiters notified and wake then up outside the mutex critical section.
863863 var notified = WaitList{};
864864 defer if (notified.len > 0) {
865 const pending = bucket.pending.fetchSub(notified.len, .Monotonic);
865 const pending = bucket.pending.fetchSub(notified.len, .monotonic);
866866 assert(pending >= notified.len);
867867
868868 while (notified.pop()) |waiter| {
......@@ -875,7 +875,7 @@ const PosixImpl = struct {
875875 defer assert(std.c.pthread_mutex_unlock(&bucket.mutex) == .SUCCESS);
876876
877877 // 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) {
879879 notified = WaitQueue.remove(&bucket.treap, address, max_waiters);
880880 }
881881 }
lib/std/Thread/RwLock.zig+1-1
......@@ -375,5 +375,5 @@ test "concurrent access" {
375375
376376 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)});
379379}
lib/std/atomic.zig+1-1
......@@ -159,7 +159,7 @@ test Value {
159159 // acquire ensures count decrement and code before
160160 // previous unrefs()s happens-before we call dropFn
161161 // below.
162 // Another alternative is to use .AcqRel on the
162 // Another alternative is to use .acq_rel on the
163163 // fetchSub count decrement but it's extra barrier in
164164 // possibly hot path.
165165 rc.count.fence(.acquire);
src/Air.zig+3-3
......@@ -727,11 +727,11 @@ pub const Inst = struct {
727727 /// Result type is always `void`.
728728 /// Uses the `bin_op` field. LHS is pointer, RHS is element.
729729 atomic_store_unordered,
730 /// Same as `atomic_store_unordered` but with `AtomicOrder.Monotonic`.
730 /// Same as `atomic_store_unordered` but with `AtomicOrder.monotonic`.
731731 atomic_store_monotonic,
732 /// Same as `atomic_store_unordered` but with `AtomicOrder.Release`.
732 /// Same as `atomic_store_unordered` but with `AtomicOrder.release`.
733733 atomic_store_release,
734 /// Same as `atomic_store_unordered` but with `AtomicOrder.SeqCst`.
734 /// Same as `atomic_store_unordered` but with `AtomicOrder.seq_cst`.
735735 atomic_store_seq_cst,
736736 /// Atomically read-modify-write via a pointer.
737737 /// 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 {
647647 .call_never_tail => try self.airCall(inst, .never_tail),
648648 .call_never_inline => try self.airCall(inst, .never_inline),
649649
650 .atomic_store_unordered => @panic("TODO try self.airAtomicStore(inst, .Unordered)"),
651 .atomic_store_monotonic => @panic("TODO try self.airAtomicStore(inst, .Monotonic)"),
652 .atomic_store_release => @panic("TODO try self.airAtomicStore(inst, .Release)"),
653 .atomic_store_seq_cst => @panic("TODO try self.airAtomicStore(inst, .SeqCst)"),
650 .atomic_store_unordered => @panic("TODO try self.airAtomicStore(inst, .unordered)"),
651 .atomic_store_monotonic => @panic("TODO try self.airAtomicStore(inst, .monotonic)"),
652 .atomic_store_release => @panic("TODO try self.airAtomicStore(inst, .release)"),
653 .atomic_store_seq_cst => @panic("TODO try self.airAtomicStore(inst, .seq_cst)"),
654654
655655 .struct_field_ptr_index_0 => try self.airStructFieldPtrIndex(inst, 0),
656656 .struct_field_ptr_index_1 => try self.airStructFieldPtrIndex(inst, 1),