Skip to content

Support ARMv6-M targets via portable-atomic - #3

Open
orielhaim wants to merge 3 commits into
Nitrokey:mainfrom
orielhaim:fix/thumbv6m-atomics
Open

orielhaim wants to merge 3 commits into
Nitrokey:mainfrom
orielhaim:fix/thumbv6m-atomics

Conversation

@orielhaim

@orielhaim orielhaim commented Nov 1, 2026 •

Copy link
Copy Markdown

Adds ARMv6-M support (Cortex-M0/M0+, RP2040) through an optional portable-atomic feature

These targets don't support atomic CAS, so AtomicPtr::compare_exchange isn't available

The new feature uses portable-atomic with critical-section support. Also replaces the deprecated compare_and_swap calls with compare_exchange

The public API remains unchanged

@sosthene-nitrokey sosthene-nitrokey left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi, Thank you for your PR.

Please make the CI also run tests with portable-atomic

Comment thread Cargo.toml Resolved
Comment thread src/lib.rs Resolved
Comment thread src/lib.rs Resolved
Comment thread src/lib.rs Resolved
@orielhaim
orielhaim requested a review from a team as a code owner November 12, 2026 17:22
@orielhaim
orielhaim requested review from daringer, robin-nitrokey and sosthene-nitrokey and removed request for a team November 12, 2026 17:22

This branch has not been deployed

No deployments
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