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

Add a min_atomic_width target option, like max_atomic_width #38579

Merged
merged 1 commit into from
Dec 28, 2016
Merged

Add a min_atomic_width target option, like max_atomic_width #38579

merged 1 commit into from
Dec 28, 2016

Conversation

whitequark
Copy link
Member

Rationale: some ISAs, e.g. OR1K, do not have atomic instructions
for byte and halfword access, and at the same time do not have
a fixed endianness, which makes it unreasonable to implement these
through word-sized atomic accesses.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@@ -377,6 +377,9 @@ pub struct TargetOptions {
pub no_integrated_as: bool,

/// Don't use this field; instead use the `.max_atomic_width()` method.
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment needs s/max/min.

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

Rationale: some ISAs, e.g. OR1K, do not have atomic instructions
for byte and halfword access, and at the same time do not have
a fixed endianness, which makes it unreasonable to implement these
through word-sized atomic accesses.
@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Contributor

bors commented Dec 26, 2016

📌 Commit 5b0700e has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Dec 28, 2016

⌛ Testing commit 5b0700e with merge 0807104...

bors added a commit that referenced this pull request Dec 28, 2016
Add a min_atomic_width target option, like max_atomic_width

Rationale: some ISAs, e.g. OR1K, do not have atomic instructions
for byte and halfword access, and at the same time do not have
a fixed endianness, which makes it unreasonable to implement these
through word-sized atomic accesses.
@bors
Copy link
Contributor

bors commented Dec 28, 2016

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 0807104 to master...

@bors bors merged commit 5b0700e into rust-lang:master Dec 28, 2016
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.

6 participants