aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Wagner <mail@lukewagner.name>2015-05-01 10:28:16 -0500
committerLuke Wagner <mail@lukewagner.name>2015-05-01 10:28:16 -0500
commitad62ada0defada3655ab7e6a2daff8ebe5db7635 (patch)
treebc92234725e2ff663a9ce0632440ac13f08dd9af
parent1716058d1ce559d2187d2d55a097289ec109f6a1 (diff)
downloadnanowasm-design-ad62ada0defada3655ab7e6a2daff8ebe5db7635.tar.gz
fill in more details about threads
-rw-r--r--EssentialPostV1Features.md18
1 files 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