Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Implement emscripten_atomic_fence(). #139

Merged
merged 1 commit into from
Mar 24, 2016

Conversation

juj
Copy link
Collaborator

@juj juj commented Mar 24, 2016

No description provided.

@kripken
Copy link
Member

kripken commented Mar 24, 2016

Is this a temporary hack, workaround, or something we were always missing?

@juj
Copy link
Collaborator Author

juj commented Mar 24, 2016

We were always missing this. The SharedArrayBuffer specification does not have atomic fence operation (it briefly did have it, but people found it too dirty and it was dropped out). Applying any atomic operation has the same effect as a fence, so we perform a no-op operation to implement it. A thought was raised with memory location 0 that a JS AoT compiler would be able to pattern match and compile this to a faster fence operation where applicable.

@kripken
Copy link
Member

kripken commented Mar 24, 2016

Ok, thanks.

@kripken kripken merged commit 9103930 into emscripten-core:incoming Mar 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants