diff options
| author | Chris Denton <chris@chrisdenton.dev> | 2024-07-16 14:56:18 +0000 |
|---|---|---|
| committer | Chris Denton <chris@chrisdenton.dev> | 2024-07-17 05:57:39 +0000 |
| commit | 0585c4a23ed7489ab21aa586eec4700b567cee03 (patch) | |
| tree | 624a338b23616753f576084d715e5b27b8bac094 /library/std/src/sys/sync/once | |
| parent | a28b35eb35ef874d068b8a66e9ff7460fa23a672 (diff) | |
| download | rust-0585c4a23ed7489ab21aa586eec4700b567cee03.tar.gz rust-0585c4a23ed7489ab21aa586eec4700b567cee03.zip | |
Prevent double reference in generic futex
Diffstat (limited to 'library/std/src/sys/sync/once')
| -rw-r--r-- | library/std/src/sys/sync/once/futex.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/sync/once/futex.rs b/library/std/src/sys/sync/once/futex.rs index 609085dcd47..8a231e65ad1 100644 --- a/library/std/src/sys/sync/once/futex.rs +++ b/library/std/src/sys/sync/once/futex.rs @@ -57,7 +57,7 @@ impl<'a> Drop for CompletionGuard<'a> { // up on the Once. `futex_wake_all` does its own synchronization, hence // we do not need `AcqRel`. if self.state.swap(self.set_state_on_drop_to, Release) == QUEUED { - futex_wake_all(&self.state); + futex_wake_all(self.state); } } } |
