Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Added a reference to C/C++ and to Rust. #145

Merged
merged 4 commits into from
Sep 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion MEMMODEL_CONSTRAINTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,20 @@ may perceive in that statement.)
affects the ability of using RMW with wide atomic operations to
implement narrow atomic operations.


## Implementation via LLVM

* Rather than target particular hardware, an implementation of
SharedArrayBuffer may use LLVM (or a similar VM) as an intermediate
representation. A possible code path would then be from C/C++
via LLVM to asm.js with shared array buffers, then via LLVM
to hardware.
* LLVM has a memory model, which includes a `seq_cst` memory order,
which is a good match to atomic accesses. It is possible that either
`monotone` or `unordered` is a good match to non-atomic accesses
(the difference between the two is per-location sequential
consistency). The LLVM model gives defined semantics to all reads
and writes with memory order `unordered` or stronger, including
accesses at different data sizes.

# Some specific problems

Expand Down