Skip to content

Clarify regular load/store semantics when threads are added - #259

Merged
jfbastien merged 5 commits into
masterfrom
jfbastien-patch-1
Jul 13, 2015
Merged

jfbastien merged 5 commits into
masterfrom
jfbastien-patch-1

Conversation

@jfbastien

Copy link
Copy Markdown
Member

Resolves #248.

Comment thread AstSemantics.md Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe clarify that we're envisioning an atomicity annotation on loads and stores, with the default being the most relaxed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Adding mention of atomicity annotation.
"relaxed" isn't quite appropriate because it has a meaning in the C++ memory model. Non-annotated accesses have different semantics than relaxed accesses: they can be elided, duplicated, split up.

Comment thread AstSemantics.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is also good content, but it seems like it belongs in PostMVP.md#threads too, so that all the interesting information about threads is in one place.

@jfbastien

Copy link
Copy Markdown
Member Author

Updated per @sunfishcode's suggestions.

Comment thread AstSemantics.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is technically correct, but only in the way that false implies P is vacuously true so I think it'd be more clear to reword. The fact that you can have separate wasm modules executing in separate workers (and thus on separate threads) is irrelevant since the wasm spec only considers the execution of a single module (much like the C spec is only talking about what's happening in a single process). I guess the goal is to provide a link from here to PostMVP.md#threads; perhaps clearer to just say "When [threads] are added, the memory model will be augmented to define the semantics of concurrent linear heap accesses." or something.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point, updated.

@jfbastien

Copy link
Copy Markdown
Member Author

Ping?

Comment thread AstSemantics.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

typo: liinear

@sunfishcode

Copy link
Copy Markdown
Member

lgtm, with typo fixed.

jfbastien added a commit that referenced this pull request Jul 13, 2015
Clarify regular load/store semantics when threads are added
@jfbastien
jfbastien merged commit 8e45192 into master Jul 13, 2015
@jfbastien
jfbastien deleted the jfbastien-patch-1 branch July 13, 2015 15:42
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