Skip to content

libcore docs should mention that some atomic operations may not be available #54250

Closed
@mvirkkunen

Description

@mvirkkunen

A number of atomic operations such as AtomicUsize::compare_exchange are simply missing on some platforms such as thumbv6m-none-eabi. The methods are behind this condition:

#[cfg(target_has_atomic = "cas")]

It's understandable that these methods aren't available on platforms that don't support compare-and-swap in hardware. However the documentation doesn't mention that at all, which might lead to people assuming that the functionality is available on all platforms. I think the documentation should clearly mention which parts of libcore may be unavailable depending on the platform.

Activity

added
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
on Sep 15, 2018
added
C-enhancementCategory: An issue proposing an enhancement or a PR with one.
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
on Mar 6, 2020
added a commit that references this issue on Jun 7, 2020

Rollup merge of rust-lang#72998 - poliorcetics:atomic-availability-do…

de1941a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.P-mediumMedium priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @steveklabnik@zackmdavis@mvirkkunen@jonas-schievink

      Issue actions

        libcore docs should mention that some atomic operations may not be available · Issue #54250 · rust-lang/rust