Skip to content

Better support for embedded targets #10

@LukasKalbertodt

Description

@LukasKalbertodt

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions