From 4d93f6056824c338751f19356d33bb61ce818749 Mon Sep 17 00:00:00 2001 From: Christopher Durham Date: Thu, 19 Sep 2024 00:15:03 -0400 Subject: use generic Atomic type where possible in core/alloc/std only for now, and ignoring test files Co-authored-by: Pavel Grigorenko --- library/std/src/sys/sync/thread_parking/pthread.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'library/std/src/sys/sync/thread_parking/pthread.rs') diff --git a/library/std/src/sys/sync/thread_parking/pthread.rs b/library/std/src/sys/sync/thread_parking/pthread.rs index 19cabd7dd75..14bc793c15d 100644 --- a/library/std/src/sys/sync/thread_parking/pthread.rs +++ b/library/std/src/sys/sync/thread_parking/pthread.rs @@ -1,8 +1,8 @@ //! Thread parking without `futex` using the `pthread` synchronization primitives. use crate::pin::Pin; -use crate::sync::atomic::AtomicUsize; use crate::sync::atomic::Ordering::{Acquire, Relaxed, Release}; +use crate::sync::atomic::{Atomic, AtomicUsize}; use crate::sys::pal::sync::{Condvar, Mutex}; use crate::time::Duration; @@ -11,7 +11,7 @@ const PARKED: usize = 1; const NOTIFIED: usize = 2; pub struct Parker { - state: AtomicUsize, + state: Atomic, lock: Mutex, cvar: Condvar, } -- cgit 1.4.1-3-g733a5