]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/atomic.hpp
Put brackets around ipv6 addresses in `inet6 present`
[factor.git] / vm / atomic.hpp
index e0bcb5092bcaf636ccc3029a6e641e30653674fc..081b3b54019211192d85ab931c3e5afa205ee9b8 100644 (file)
@@ -1,27 +1,32 @@
 namespace factor {
-       namespace atomic {
-               FACTOR_FORCE_INLINE static cell load(volatile cell *ptr)
-               {
-                       atomic::fence();
-                       return *ptr;
-               }
+namespace atomic {
+FACTOR_FORCE_INLINE static bool load(volatile bool* ptr) {
+  atomic::fence();
+  return *ptr;
+}
+FACTOR_FORCE_INLINE static cell load(volatile cell* ptr) {
+  atomic::fence();
+  return *ptr;
+}
+
+FACTOR_FORCE_INLINE static fixnum load(volatile fixnum* ptr) {
+  atomic::fence();
+  return *ptr;
+}
 
-               FACTOR_FORCE_INLINE static fixnum load(volatile fixnum *ptr)
-               {
-                       atomic::fence();
-                       return *ptr;
-               }
+FACTOR_FORCE_INLINE static void store(volatile bool* ptr, bool val) {
+  *ptr = val;
+  atomic::fence();
+}
 
-               FACTOR_FORCE_INLINE static void store(volatile cell *ptr, cell val)
-               {
-                       *ptr = val;
-                       atomic::fence();
-               }
+FACTOR_FORCE_INLINE static void store(volatile cell* ptr, cell val) {
+  *ptr = val;
+  atomic::fence();
+}
 
-               FACTOR_FORCE_INLINE static void store(volatile fixnum *ptr, fixnum val)
-               {
-                       *ptr = val;
-                       atomic::fence();
-               }
-       }
+FACTOR_FORCE_INLINE static void store(volatile fixnum* ptr, fixnum val) {
+  *ptr = val;
+  atomic::fence();
+}
+}
 }