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

std: Stabilize fixed-width integer atomics #57425

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
7 participants
@alexcrichton
Copy link
Member

alexcrichton commented Jan 7, 2019

This commit stabilizes the Atomic{I,U}{8,16,32,64} APIs in the
std::sync::atomic and core::sync::atomic modules. Proposed in #56753
and tracked in #32976 this feature has been unstable for quite some time
and is hopefully ready to go over the finish line now!

The API is being stabilized as-is. The API of AtomicU8 and friends
mirrors that of AtomicUsize. A list of changes made here are:

  • A portability documentation section has been added to describe the
    current state of affairs.
  • Emulation of smaller-size atomics with larger-size atomics has been
    documented.
  • As an added bonus, ATOMIC_*_INIT is now scheduled for deprecation
    across the board in 1.34.0 now that const functions can be invoked
    in statics.

Note that the 128-bit atomic types are omitted from this stabilization
explicitly. They have far less platform support than the other atomic
types, and will likely require further discussion about their best
location.

Closes #32976
Closes #56753

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jan 7, 2019

Note that this is currently still blocked on the FCP in #56753, so this shouldn't be approved until that FCP has finished.

std: Stabilize fixed-width integer atomics
This commit stabilizes the `Atomic{I,U}{8,16,32,64}` APIs in the
`std::sync::atomic` and `core::sync::atomic` modules. Proposed in #56753
and tracked in #32976 this feature has been unstable for quite some time
and is hopefully ready to go over the finish line now!

The API is being stabilized as-is. The API of `AtomicU8` and friends
mirrors that of `AtomicUsize`. A list of changes made here are:

* A portability documentation section has been added to describe the
  current state of affairs.
* Emulation of smaller-size atomics with larger-size atomics has been
  documented.
* As an added bonus, `ATOMIC_*_INIT` is now scheduled for deprecation
  across the board in 1.34.0 now that `const` functions can be invoked
  in statics.

Note that the 128-bit atomic types are omitted from this stabilization
explicitly. They have far less platform support than the other atomic
types, and will likely require further discussion about their best
location.

Closes #32976
Closes #56753

@alexcrichton alexcrichton force-pushed the alexcrichton:stabilize-atomics branch from 9ec879f to 626a6a8 Jan 8, 2019

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jan 8, 2019

r? @sfackler

(for eventual stabilization)

@rust-lang rust-lang deleted a comment from rust-highfive Jan 9, 2019

@Centril Centril added the relnotes label Jan 9, 2019

stable(feature = "integer_atomics_stable", since = "1.33.0"),
stable(feature = "integer_atomics_stable", since = "1.33.0"),
stable(feature = "integer_atomics_stable", since = "1.33.0"),
stable(feature = "integer_atomics_stable", since = "1.33.0"),

This comment has been minimized.

@Centril

Centril Jan 9, 2019

Contributor

If you want to wait out the full FCP duration (10 days) then this will miss the 1.33 master=>beta promotion date which is on the 15th of January (FCP completes around 18-19th). An alternative would be to not wait out the 10 days... up to you. :)

This comment has been minimized.

@hellow554

hellow554 Jan 23, 2019

Contributor

I guess this needs to be changed to 1.34.0 then ;)

@Centril Centril added the T-libs label Jan 10, 2019

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