diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-04-09 17:30:44 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-04-09 17:30:44 -0700 |
commit | e2811fed826db20a10af7f70ac44f1aad9f06aa5 (patch) | |
tree | 1547479e45b6dd790d57d2d4b765117dc2a60b2e /src | |
parent | 0fa67a6cdc857afd269612117380d0df7ab54b4e (diff) |
start on c++11 atomics implementation and test; #2273
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js index 6c2bfa36..b000c7f4 100644 --- a/src/library.js +++ b/src/library.js @@ -4430,6 +4430,12 @@ LibraryManager.library = { llvm_nacl_atomic_store_i32__inline: true, + // gnu atomics + + __atomic_is_lock_free: function(size, ptr) { + return size <= 4 && (ptr&(size-1)) == 0; + }, + // ========================================================================== // llvm-mono integration // ========================================================================== |