From 5ce40e61c6f5c05925aa5116cc6c61fbae8a6263 Mon Sep 17 00:00:00 2001 From: Michael Dusan Date: Fri, 15 Mar 2024 02:28:50 -0400 Subject: bsd: debitrot AtomicOrder renames - complete std.builtin.AtomicOrder renames that were missed from 6067d39522f --- lib/std/Thread/Futex.zig | 8 ++++---- lib/std/Thread/RwLock.zig | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/std/Thread') diff --git a/lib/std/Thread/Futex.zig b/lib/std/Thread/Futex.zig index 160d983c71..764d3f13e1 100644 --- a/lib/std/Thread/Futex.zig +++ b/lib/std/Thread/Futex.zig @@ -801,7 +801,7 @@ const PosixImpl = struct { assert(std.c.pthread_mutex_lock(&bucket.mutex) == .SUCCESS); defer assert(std.c.pthread_mutex_unlock(&bucket.mutex) == .SUCCESS); - cancelled = ptr.load(.Monotonic) != expect; + cancelled = ptr.load(.monotonic) != expect; if (cancelled) { return; } @@ -855,14 +855,14 @@ const PosixImpl = struct { // The pending count increment in wait() must also now use seq_cst for the update + this pending load // to be in the same modification order as our load isn't using release/acquire to guarantee it. bucket.pending.fence(.seq_cst); - if (bucket.pending.load(.Monotonic) == 0) { + if (bucket.pending.load(.monotonic) == 0) { return; } // Keep a list of all the waiters notified and wake then up outside the mutex critical section. var notified = WaitList{}; defer if (notified.len > 0) { - const pending = bucket.pending.fetchSub(notified.len, .Monotonic); + const pending = bucket.pending.fetchSub(notified.len, .monotonic); assert(pending >= notified.len); while (notified.pop()) |waiter| { @@ -875,7 +875,7 @@ const PosixImpl = struct { defer assert(std.c.pthread_mutex_unlock(&bucket.mutex) == .SUCCESS); // Another pending check again to avoid the WaitQueue lookup if not necessary. - if (bucket.pending.load(.Monotonic) > 0) { + if (bucket.pending.load(.monotonic) > 0) { notified = WaitQueue.remove(&bucket.treap, address, max_waiters); } } diff --git a/lib/std/Thread/RwLock.zig b/lib/std/Thread/RwLock.zig index 2152c0756c..c4a8755907 100644 --- a/lib/std/Thread/RwLock.zig +++ b/lib/std/Thread/RwLock.zig @@ -375,5 +375,5 @@ test "concurrent access" { try testing.expectEqual(num_writes, runner.writes); - //std.debug.print("reads={}\n", .{ runner.reads.load(.Unordered)}); + //std.debug.print("reads={}\n", .{ runner.reads.load(.unordered)}); } -- cgit v1.2.3