Skip to content

Commit

Permalink
Use portable_atomic instead of atomic-polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
taks committed Nov 18, 2023
1 parent 874f937 commit 5f88676
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ members = ["xtask"]

[dependencies]
parking_lot_core = { version = "0.9.3", optional = true, default_features = false }
atomic-polyfill = { version = "1", optional = true }
portable-atomic = { version = "1", optional = true }
critical-section = { version = "1", optional = true }

[dev-dependencies]
Expand All @@ -48,15 +48,12 @@ parking_lot = ["dep:parking_lot_core"]
# Uses `critical-section` to implement `sync` and `race` modules. in
# `#![no_std]` mode. Please read `critical-section` docs carefully
# before enabling this feature.
critical-section = ["dep:critical-section", "dep:atomic-polyfill" ]
critical-section = ["dep:critical-section", "portable-atomic" ]

# Enables semver-exempt APIs of this crate.
# At the moment, this feature is unused.
unstable = []

# Only for backwards compatibility.
atomic-polyfill = ["critical-section"]

[[example]]
name = "bench"
required-features = ["std"]
Expand Down
2 changes: 1 addition & 1 deletion src/imp_cs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use core::panic::{RefUnwindSafe, UnwindSafe};

use atomic_polyfill::{AtomicBool, Ordering};
use portable_atomic::{AtomicBool, Ordering};
use critical_section::{CriticalSection, Mutex};

use crate::unsync;
Expand Down

0 comments on commit 5f88676

Please sign in to comment.