aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-04-09 17:30:44 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-04-09 17:30:44 -0700
commite2811fed826db20a10af7f70ac44f1aad9f06aa5 (patch)
tree1547479e45b6dd790d57d2d4b765117dc2a60b2e /src
parent0fa67a6cdc857afd269612117380d0df7ab54b4e (diff)
start on c++11 atomics implementation and test; #2273
Diffstat (limited to 'src')
-rw-r--r--src/library.js6
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
// ==========================================================================