From ad62ada0defada3655ab7e6a2daff8ebe5db7635 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Fri, 1 May 2015 10:28:16 -0500 Subject: fill in more details about threads --- EssentialPostV1Features.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/EssentialPostV1Features.md b/EssentialPostV1Features.md index 4976187..67cbbe2 100644 --- a/EssentialPostV1Features.md +++ b/EssentialPostV1Features.md @@ -8,12 +8,18 @@ in [future versions](FutureFeatures.md). * TODO ## Threads -* Shared memory -* Atomics -* Futex or [synchronic][] -* Thread-local storage - - [synchronic]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4195.pdf +* Provide low-level buildings blocks for pthreads-style shared memory: shared memory, + atomics + futexes (or [synchronics](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4195.pdf)). +* Import [SharedArrayBuffer proposal](https://docs.google.com/document/d/1NDGA_gZJ7M7w1Bh8S0AoDyEqwDdRh4uSoTPSNn77PFk). + * The goal is to reuse the specification of memory model, happens-before, etc (with TC39) and backend implementation + (same IR nodes and semantic invariants preserved). +* Modules can have global variables that are either shared or thread-local. + * While the heap could be used for shared global variables, global variables are not aliasable + and thus allow more aggressive optimization. +* Initially, a WebAssembly module is distributed between workers via `postMessage()`. + * This also has the effect of explicitly sharing code so that engines don't + perform N fetches and compile N copies. + * May later standardize a more direct way to create a thread from WebAssembly. ## Fixed-width SIMD * TODO -- cgit v1.2.3