diff options
| author | protty <45520026+kprotty@users.noreply.github.com> | 2022-04-26 16:48:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-26 16:48:56 -0500 |
| commit | 18f30346291bd2471e07924af161de080935dd60 (patch) | |
| tree | 609cdd73aa40f15625f896e79b9420b3e320ddcd /lib/std/Thread/Futex.zig | |
| parent | 50f1856476038e57f5d2f47c751f608b0b360662 (diff) | |
| download | zig-18f30346291bd2471e07924af161de080935dd60.tar.gz zig-18f30346291bd2471e07924af161de080935dd60.zip | |
std.Thread: ResetEvent improvements (#11523)
* std: start removing redundant ResetEvents
* src: fix other uses of std.Thread.ResetEvent
* src: add builtin.sanitize_thread for tsan detection
* atomic: add Atomic.fence for proper fencing with tsan
* Thread: remove the other ResetEvent's and rewrite the current one
* Thread: ResetEvent docs
* zig fmt + WaitGroup.reset() fix
* src: fix build issues for ResetEvent + tsan
* Thread: ResetEvent tests
* Thread: ResetEvent module doc
* Atomic: replace llvm *p memory constraint with *m
* panicking: handle spurious wakeups in futex.wait() when waiting for abort()
* zig fmt
Diffstat (limited to 'lib/std/Thread/Futex.zig')
| -rw-r--r-- | lib/std/Thread/Futex.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Thread/Futex.zig b/lib/std/Thread/Futex.zig index 33eb30ba9d..bbe6b813ba 100644 --- a/lib/std/Thread/Futex.zig +++ b/lib/std/Thread/Futex.zig @@ -809,7 +809,7 @@ const PosixImpl = struct { // // The pending count increment in wait() must also now use SeqCst for the update + this pending load // to be in the same modification order as our load isn't using Release/Acquire to guarantee it. - std.atomic.fence(.SeqCst); + bucket.pending.fence(.SeqCst); if (bucket.pending.load(.Monotonic) == 0) { return; } |
