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

Update portable-atomic to 1 #139

Merged
merged 1 commit into from
Feb 20, 2023
Merged

Conversation

taiki-e
Copy link
Contributor

@taiki-e taiki-e commented Feb 20, 2023

The main change in this release is adding an optional critical-section feature1 to support custom critical section implementations with rust-embedded's critical-section crate. (taiki-e/portable-atomic#51) This allows portable-atomic to provide atomic CAS on multicore systems that do not have native atomic CAS instructions.

portable-atomic is not used in spin's public API and the (cfg) interfaces of portable-atomic 0.3 and portable-atomic 1.x are compatible, so this update should not be a breaking change. (taiki-e/portable-atomic#61 (comment))

Footnotes

  1. This is a feature, not a cfg; critical-section 1.x doesn't provide the default or opt-in potentially unsound implementation (unlike critical-section 0.x where the implementation for single-core was enabled by default), and users must implement the critical-section implementation that sound for their system by implementing an unsafe trait (or to use the crate that provides such an implementation). So, we have determined that it is okay to treat this as a safe feature.

@zesterer
Copy link
Collaborator

Thanks!

@zesterer zesterer merged commit bb41f3e into mvdnes:master Feb 20, 2023
@zesterer
Copy link
Collaborator

Did you need this in a release?

@taiki-e taiki-e deleted the portable-atomic branch February 20, 2023 13:57
zesterer pushed a commit to zesterer/spin-rs that referenced this pull request Mar 27, 2023
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