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

Enable portable-atomic's require-cas feature #152

Merged
merged 1 commit into from
May 11, 2023

Conversation

taiki-e
Copy link
Contributor

@taiki-e taiki-e commented May 11, 2023

This provides a better error message if the end user forgets to use the cfg or feature. (Also allows using the critical-section feature instead of the cfg.)

$ cargo build --target thumbv6m-none-eabi --no-default-features --features spin_mutex,portable_atomic
   Compiling portable-atomic v1.3.2
error: dependents require atomic CAS but not available on this target by default;
       consider using portable_atomic_unsafe_assume_single_core cfg or critical-section feature.
       see <https://docs.rs/portable-atomic/latest/portable_atomic/#optional-cfg> for more.

This also reverts the following commits (partially):

This provides a better error message if the end user forgets to use the
cfg or feature.

This also reverts the following commits (partially):
- mvdnes@94cd9c5
- mvdnes@b1ee815
- mvdnes@0e0ddca
- mvdnes@3d061b8
@zesterer
Copy link
Collaborator

Thanks, this is great! I really appreciate the time you've put into this.

@zesterer zesterer merged commit 5be251f into mvdnes:master May 11, 2023
@taiki-e taiki-e deleted the portable-atomic-require-cas branch May 11, 2023 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants