Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use portable_atomic instead of atomic-polyfill #251

Merged
merged 6 commits into from Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions Cargo.toml
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"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s keep this, it’s not a burden to support a feature alias, and this might prevent someone’s build from breaking


[[example]]
name = "bench"
required-features = ["std"]
Expand Down
2 changes: 1 addition & 1 deletion src/imp_cs.rs
@@ -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