Conversation
Member
|
We only use load/store on this AtomicPtr. thumbv6m is one such target that can do atomic load/store but not CAS. Merging this would hurt perf on that one. |
Member
|
what target are you running into this problem with? can we just add it? also, never enable critical-section on portable-atomic from a lib. There's other ways to polyfill like |
Contributor
Author
|
I'm trying to run Embassy on an MC1322x, which appears to lack any atomics and is pretty old. It works with this fix |
SimonIT
force-pushed
the
executor-atomicptr-target-has-atomic
branch
from
September 17, 2026 09:00
2f77c7f to
d207a8b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TaskHeader::executor/all_tasks_next used core::sync::atomic::AtomicPtr unconditionally, falling back to portable_atomic::AtomicPtr only under feature = "platform-avr". AVR isn't the only target with no native pointer-wide atomics (max-atomic-width: 0), so any other such target using this field hit a hard compile error instead of falling back.
Gate both cfg branches on target_has_atomic = "ptr" instead, matching run_queue/state's existing pattern in the same file, and make portable-atomic a plain (non-optional) dependency since it's now needed outside of platform-avr too.