-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use AtomicPtr instead of AtomicUsize for Weak (#263)
This allows Strict Provenance to work properly, fixing #262. It also now matches what `libstd` does: https://github.com/rust-lang/rust/blob/9f7e997c8bc3cacd2ab4eb75e63cb5fa9279c7b0/library/std/src/sys/unix/weak.rs#L85-L141 Also, while reading the `libstd` code, I noticed that they use an `Acquire` fence and `Release` store as the returned pointer should have "consume" semantics. As this doesn't yet exist in Rust, we instead do exactly what `libstd` does, which means: - Relaxed Load - Release Store - Acquire fence when returning pointer Signed-off-by: Joe Richey <[email protected]> Co-authored-by: Joe ST <[email protected]>
- Loading branch information
Showing
1 changed file
with
45 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters