-
Notifications
You must be signed in to change notification settings - Fork 56
Support portable atomic #106
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
Support portable atomic #106
Conversation
Co-authored-by: Zachary Harrold <[email protected]>
This lets us remove the old hack!
|
Thanks for the PR! The implementation looks good. Could you update CI config to check the case where this feature enabled? It would be sufficient to replace the following two with the commands used in async-task (this and this), async-channel/.github/workflows/ci.yml Lines 63 to 64 in 3ce7937
async-channel/.github/workflows/ci.yml Lines 77 to 78 in 3ce7937
and add two additional cases ( async-channel/.github/workflows/ci.yml Lines 55 to 56 in 3ce7937
|
|
@taiki-e Thanks! I'm no expert with CI, so I'm not certain this does what you're asking, but I think it does. Does it look right to you now? |
.github/workflows/ci.yml
Outdated
| - name: Run cargo check for non atomic platforms | ||
| run: cargo hack build --feature-powerset --no-dev-deps --target thumbv7m-none-eabi --skip std,default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non atomic platforms
thumbv7m has atomics...
You have to use thumbv6m if you want to check target without atomics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll be honest, I don't know that much about these platforms. I copied this check from bevy ci. If you wan't to change, the 7 to a 6, go for it. (Or I can if you prefer.) But I don't have the context to know which is what y'all want to use here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I actually prefer to check both, so I added the change for that.
|
Sounds good. Thanks! |
|
Published in 2.4.0. |
This lets users use this crate on targets that don't support atomics.
cargo check --no-default-features --target thumbv6m-none-eabiFails on main.But
cargo check --no-default-features --target thumbv6m-none-eabi --features portable-atomic,portable-atomic/fallback,portable-atomic/critical-sectionpasses on this PR.This is blocking work in dependent PRs, for example, see here.