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 wake and ixx.wait instructions to spec doc #76

Merged
merged 3 commits into from
Oct 31, 2017
Merged

Add wake and ixx.wait instructions to spec doc #76

merged 3 commits into from
Oct 31, 2017

Conversation

binji
Copy link
Member

@binji binji commented Oct 26, 2017

Syntax, validation, binary and text sections are completed. Execution section is still TODO.

@binji binji requested a review from rossberg October 26, 2017 21:41
Copy link
Member

@rossberg rossberg left a comment

Choose a reason for hiding this comment

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

Looks good. One design question, though: shouldn't the names of these instructions include the atomic prefix like the others?

@@ -327,6 +329,13 @@ this action conditionally, if the read value is equal to a provided comparison
argument. All other :ref:`atomicops <syntax-atomicop>` have behavior of the
:ref:`ibinop <syntax-ibinop>` of the same name.

The |WAKE| and |WAIT| instructions provide primitive synchronization between
:ref:`threads <syntax-thread>`. The |WAIT| instructions atomically load a value
from the calculated *effective address* and compare it to an expected value. If
Copy link
Member

Choose a reason for hiding this comment

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

Nit: no need to emphasize "effective address" here, since the defining occurrence already was above.

@binji
Copy link
Member Author

binji commented Oct 27, 2017

Looks good. One design question, though: shouldn't the names of these instructions include the atomic prefix like the others?

I suppose so. My original thought was that the atomic was necessary to differentiate from i32.load and i32.store, and the rmw ops got it for consistency, but wait and wake didn't really need it. But another thought is that atomic should be used for any operation with the atomic binary prefix.

@rossberg
Copy link
Member

Such visual classification would be particularly useful in the context of "compartmentalising" the language as we've discussed at the July meeting.

@jfbastien
Copy link
Member

Adding "atomic" is probably worth a quick poll, should be easy to get through.

@binji
Copy link
Member Author

binji commented Oct 27, 2017

Sounds good, I'll move forward with the name change for now (since I think it's probably better), and roll back if the CG disagrees.

@jfbastien
Copy link
Member

@binji can you add an agenda item for this?

@binji binji merged commit 470b4b4 into master Oct 31, 2017
@binji binji deleted the wait-wake branch October 31, 2017 22:04
@binji
Copy link
Member Author

binji commented Nov 15, 2017

The poll in the CG meeting slightly favored switching to using the atomic prefix, so I'll leave that in the spec.

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.

None yet

3 participants