You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that we removed these originally because they were lowered to intrinsic calls on arm. Now that we're linking to compiler-rt, though (and passing v7 by default on arm), this is probably fine.
This adds various `fetch_` methods to `AtomicPtr` that are present on
other `Atomic*` types. It does so such that libraries that depend on
atomic operations on pointers do not have to cast those pointers to
`usize` and fiddle around with `AtomicUsize` instead.
Note that this patch currently implements `fetch_add` and `fetch_sub`
without considering the size of the pointer target. This is unlike
regular pointer additions and subtractions. The rationale for this is
that for atomic operations, the user may indeed wish to truly increment
by 1, which is difficult if all deltas are interpreted in increments of
the type's size.
This patch effectively resurrects the change from rust-lang#10154. Based on
rust-lang#12949 (comment),
the rationale for not making the changes at the time no longer hold.
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
Aug 9, 2022
I don't see any reason these shouldn't exist.
The text was updated successfully, but these errors were encountered: