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

Add Cargo feature to use critical-section. #51

Merged
merged 9 commits into from
Jan 12, 2023
Prev Previous commit
Next Next commit
Disallow single-core plus critical-section enabled simultaneously.
Dirbaio committed Jan 11, 2023

Unverified

This user has not yet uploaded their public signing key.
commit 891f19a851c1c43d094963769a0b55762591ac38
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -341,6 +341,11 @@ compile_error!(
"cfg(portable_atomic_s_mode) may only be used together with cfg(portable_atomic_unsafe_assume_single_core)"
);

#[cfg(all(portable_atomic_unsafe_assume_single_core, feature="critical-section"))]
compile_error!(
"You may not enable feature `critical-section` and cfg(portable_atomic_unsafe_assume_single_core) at the same time."
);

#[cfg(any(test, feature = "std"))]
extern crate std;