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
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
rust_atomic_increment needs to be replaced either with atomic_xadd, atomic_xadd_acq or atomic_xadd_rel. Probably atomic_xadd is the safest unless you can determine that one of the other two is appropriate. I'm not familiar with the differences.
atomic_xadd_acq would be plenty safe in the clone_shared_mutable_state case.
The suffixes denote whether the instruction is intended to have "acquire" or "release" semantics, which means that on the processor (or maybe compiler instruction-selection?) level, they might be reordered to be earlier (for acquire) or later (for release). Using atomic_xadd is always safer than ..._acq or ..._rel, which are only for potential performance.
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
There are intrinsics for this purpose now.
The text was updated successfully, but these errors were encountered: