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

do not reference LLVM for our concurrency memory model #65339

Merged
merged 3 commits into from
Oct 13, 2019

Conversation

RalfJung
Copy link
Member

Fixes #65282

@rust-highfive
Copy link
Collaborator

r? @KodrAus

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 12, 2019
@@ -18,11 +18,11 @@
//!
//! Each method takes an [`Ordering`] which represents the strength of
//! the memory barrier for that operation. These orderings are the
//! same as [LLVM atomic orderings][1]. For more information see the [nomicon][2].
//! same as the [C++ atomic orderings][1]. For more information see the [nomicon][2].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not C11?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK C just copies C++ here. And there were some fixes since C++11.

But indeed the Nomicon says "C11"...

Copy link
Contributor

@Centril Centril Oct 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea; I mostly want to have a consistent saying one way or the other. (I don't have a preference re. which place should be updated and you are the field expert. Tho cc @nikomatsakis )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Adding Cc in an edit does not trigger email notifications.)

The C page on memory_order is much less informative, so I'd prefer to link to the C++ page. And that page currently reflects C++20. I am not sure if it is worth trying to pin a page from some older C++ version; AFAIK all the changes have been bugfixes that we certainly want.

I assume @Gankra wrote "C11" as most people just say "C11 concurrency". It's shorter to write than "C/C++ from 2011 and later".

Cc @nikomatsakis @Gankra

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could replace "C++" by "C/C++" everywhere, and we could do the same in the Nomicon?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, also see rust-lang/nomicon#168.

Copy link
Contributor

@petrochenkov petrochenkov Oct 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a minor thing, but I'm glad to see this fixed, I've been correcting Gankro on this since at least three years ago.

(I suspect the people using "C11 concurrency" are exactly those who read it from Nomicon, because I very rarely see it used outside of Rust community.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@petrochenkov so do you think we should further clarify the comment I added on this in the Nomicon?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not just Gankra though; here's a talk by some of my colleagues also using "C11". I think it is generally understood as a short-hand for "C/C++11" -- but it is indeed somewhat confusing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, looks ok as is.

@Centril
Copy link
Contributor

Centril commented Oct 12, 2019

r? @Centril

@rust-highfive rust-highfive assigned Centril and unassigned KodrAus Oct 12, 2019
@Centril
Copy link
Contributor

Centril commented Oct 12, 2019

Thanks ❤️

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 12, 2019

📌 Commit f363550 has been approved by Centril

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 12, 2019
@rust-highfive

This comment has been minimized.

@RalfJung
Copy link
Member Author

@bors r=Centril

@bors
Copy link
Contributor

bors commented Oct 12, 2019

📌 Commit d6ab45d has been approved by Centril

Centril added a commit to Centril/rust that referenced this pull request Oct 13, 2019
do not reference LLVM for our concurrency memory model

Fixes rust-lang#65282
bors added a commit that referenced this pull request Oct 13, 2019
Rollup of 13 pull requests

Successful merges:

 - #65039 (Document missing deny by default lints)
 - #65069 (Implement Clone::clone_from for VecDeque)
 - #65165 (Improve docs on some char boolean methods)
 - #65248 (Suggest `if let` on `let` refutable binding)
 - #65250 (resolve: fix error title regarding private constructors)
 - #65295 (Move diagnostics code out of the critical path)
 - #65320 (Report `CONST_ERR` lint in external macros)
 - #65327 (replace the hand-written binary search with the library one)
 - #65339 (do not reference LLVM for our concurrency memory model)
 - #65357 (syntax: simplify maybe_annotate_with_ascription)
 - #65358 (simplify maybe_stage_features)
 - #65359 (simplify integer_lit)
 - #65360 (mbe: reduce panictry! uses.)

Failed merges:

r? @ghost
@bors bors merged commit d6ab45d into rust-lang:master Oct 13, 2019
@RalfJung RalfJung deleted the atomic-ordering branch October 15, 2019 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

atomic::Ordering "same as LLVM's"? Seems wrong.
6 participants