Skip to content

Added missing memory orderings for atomic types. - #7993

Closed
Xazax-hun wants to merge 1 commit into
rust-lang:masterfrom
Xazax-hun:master
Closed

Added missing memory orderings for atomic types.#7993
Xazax-hun wants to merge 1 commit into
rust-lang:masterfrom
Xazax-hun:master

Conversation

@Xazax-hun

Copy link
Copy Markdown
Contributor

Added missing memory orderings for atomic types. #7422

@huonw

Copy link
Copy Markdown
Contributor

cc @Aatch and/or @bblum.

@Xazax-hun

Copy link
Copy Markdown
ContributorAuthor

If the behavior is same as in C++11, they are similar but not exactly the same. SeqCst also guarantees a total ordering.

Source: http://en.cppreference.com/w/cpp/atomic/memory_order

@bblum

Copy link
Copy Markdown
Contributor

Ah, thank you. So most of the places where we use SeqCst actually only need AcqRel, and there's a performance penalty associated with SeqCst, even on x86.

bors added a commit that referenced this pull request Jul 24, 2013
Added missing memory orderings for atomic types. #7422
@borsbors closed this Jul 24, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 2, 2021
`no_std_swap`: Fix typo in TODO
changelog: none
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
7993: Use auto-deref in completion scoring r=JoshMcguigan a=ivan770
Closesrust-lang#7982 Co-authored-by: ivan770 <leshenko.ivan770@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

@Xazax-hun@huonw@bblum@bors