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

Better support for embedded targets #10

Open
LukasKalbertodt opened this issue Apr 9, 2022 · 0 comments
Open

Better support for embedded targets #10

LukasKalbertodt opened this issue Apr 9, 2022 · 0 comments

Comments

@LukasKalbertodt
Copy link
Owner

Some targets do not offer all atomic features used in core::sync::atomic. On those targets, the standard library just does not have specific types or methods. This is problematic for atomig, as those types/methods are referred to anyway, even if a user of atomig would not use them. So in order for atomig to compile on those targets, we need to #[cfg] guard types and methods appropriately.

Unfortunately, the cfg checks that are available on stable are not super powerful yet. There is only target_has_atomic = * where * can be a size like 8, 16, ... and "ptr". This already helped somewhat and made atomig compile for targets like thumbv7em-none-eabi. But other targets need more fine-grained control. For example, compiling for thumbv6m-none-eabi results in no Atom implementations at all. So we are waiting for stuff like:

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

No branches or pull requests

1 participant