diff options
| author | Michael Dusan <michael.dusan@gmail.com> | 2024-03-15 02:28:50 -0400 |
|---|---|---|
| committer | Michael Dusan <michael.dusan@gmail.com> | 2024-03-15 02:28:50 -0400 |
| commit | 5ce40e61c6f5c05925aa5116cc6c61fbae8a6263 (patch) | |
| tree | c2bdea1b2eeb0b2e9d551e6e5621390739818e3a /lib/std/Thread/Futex.zig | |
| parent | cf4a2099e1e3c600ee65628153a280f5b2cd51fd (diff) | |
| download | zig-5ce40e61c6f5c05925aa5116cc6c61fbae8a6263.tar.gz zig-5ce40e61c6f5c05925aa5116cc6c61fbae8a6263.zip | |
bsd: debitrot AtomicOrder renames
- complete std.builtin.AtomicOrder renames that were missed from 6067d39522f
Diffstat (limited to 'lib/std/Thread/Futex.zig')
| -rw-r--r-- | lib/std/Thread/Futex.zig | 8 |
1 files changed, 4 insertions, 4 deletions
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); } } |
