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
Compare-and-swap methods on the atomic types in core::sync::atomic seem to be gated by #[cfg(target_has_atomic = "cas")] to only define them on targets that support CAS in hardware. However compare_exchange_weak isn't gated at all. This looks like an oversight, if the intention is to never define those methods if the target doesn't actually support them.
N.b. on at least the thumbv6m-none-eabi target, compare_exchange_weak compiles to calls to the same internal functions (__sync_val_compare_and_swap_4 and similar, presumably in compiler-rt or something) as compare_exchange.