From 328b493cb5256058e9bab1d9fdbc3bae9db83e45 Mon Sep 17 00:00:00 2001 From: jtnunley Date: Mon, 29 Aug 2022 08:25:03 -0700 Subject: [PATCH] use portable-atomic instead --- Cargo.toml | 4 ++-- src/lib.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e515077..5754b1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,8 +20,8 @@ categories = ["asynchronous", "concurrency"] exclude = ["/.*"] [dependencies] -# Uses user-provided critical sections on targets without atomics. -atomic-polyfill = { version = "1", optional = true } +# Uses portable-atomic polyfill atomics on targets without them +portable-atomic = { version = "0.3", optional = true } [dev-dependencies] futures = "0.3.5" diff --git a/src/lib.rs b/src/lib.rs index a0b3753..bf24b2a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,9 +17,9 @@ use core::fmt; use core::sync::atomic::Ordering::{AcqRel, Acquire, Release}; use core::task::Waker; -#[cfg(feature = "atomic-polyfill")] -use atomic_polyfill::AtomicUsize; -#[cfg(not(feature = "atomic-polyfill"))] +#[cfg(feature = "portable-atomic")] +use portable_atomic::AtomicUsize; +#[cfg(not(feature = "portable-atomic"))] use core::sync::atomic::AtomicUsize; /// A synchronization primitive for task wakeup.