Skip to content

Add atomic load/store intrinsics to the compiler. - #6437

Closed
Thiez wants to merge 3 commits into
rust-lang:incomingfrom
Thiez:atomic
Closed

Add atomic load/store intrinsics to the compiler.#6437
Thiez wants to merge 3 commits into
rust-lang:incomingfrom
Thiez:atomic

Conversation

@Thiez

Copy link
Copy Markdown
Contributor

This pull request adds 4 atomic intrinsics to the compiler, in preparation for #5042.

  • atomic_load(src: &int) -> int performs an atomic sequentially consistent load.
  • atomic_load_acq(src: &int) -> int performs an atomic acquiring load.
  • atomic_store(dst: &mut int, val: int) performs an atomic sequentially consistent store.
  • atomic_store_rel(dst: &mut int, val: int) performs an atomic releasing store.

For more information about the whole acquire/release thing: http://llvm.org/docs/Atomics.html

r?

Thiez added 2 commits May 12, 2013 23:23
… intrinsics.
The default versions (atomic_load and atomic_store) are sequentially consistent.
The atomic_load_acq intrinsic acquires as described in [1].
The atomic_store_rel intrinsic releases as described in [1].
[1]: http://llvm.org/docs/Atomics.html
@Thiez

Copy link
Copy Markdown
ContributorAuthor

It never is, it seems I neglected to remove that after copying the original definition of Load. It has been removed now.
r? @brson

@brson

Copy link
Copy Markdown
Contributor

Thanks! 🌷

@Thiez

Copy link
Copy Markdown
ContributorAuthor

r?

bors added a commit that referenced this pull request May 13, 2013
This pull request adds 4 atomic intrinsics to the compiler, in preparation for #5042.
* `atomic_load(src: &int) -> int` performs an atomic sequentially consistent load.
* `atomic_load_acq(src: &int) -> int` performs an atomic acquiring load.
* `atomic_store(dst: &mut int, val: int)` performs an atomic sequentially consistent store.
* `atomic_store_rel(dst: &mut int, val: int)` performs an atomic releasing store.
For more information about the whole acquire/release thing: http://llvm.org/docs/Atomics.html
r?
@borsbors closed this May 13, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request May 5, 2022
…fate
Extend `extra_unused_lifetimes` to handle impl lifetimes
Fixesrust-lang#6437 (cc: `@carols10cents)`
changelog: fixrust-lang#6437
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
6437: Document doer object anti-pattern r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Thiez@brson@Aatch@bors