Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing memory orderings for atomic types. #7993

Closed
wants to merge 1 commit into from

Conversation

Xazax-hun
Copy link
Contributor

Added missing memory orderings for atomic types. #7422

@huonw
Copy link
Member

huonw commented Jul 23, 2013

cc @Aatch and/or @bblum.

@Xazax-hun
Copy link
Contributor Author

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
Contributor

bblum commented Jul 23, 2013

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
@bors bors 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
Sign up for free to 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