Architectural Support: x86_64 (#37)
[lunaix-os.git] / lunaix-os / includes / lunaix / compiler.h
index a0b83747b2401cc62df3b7ade9cb30efc7ec9596..28ae36e7232a671c74061d46dce39923e3c6c959 100644 (file)
@@ -14,6 +14,8 @@
 #define unreachable             __builtin_unreachable()
 #define no_inline               __attribute__((noinline))
 
+#define defualt                 weak
+
 #define clz(bits)               __builtin_clz(bits)
 #define sadd_overflow(a, b, of) __builtin_sadd_overflow(a, b, of)
 #define umul_overflow(a, b, of) __builtin_umul_overflow(a, b, of)
 #define compact                 __attribute__((packed))
 #define align(v)                __attribute__((aligned (v)))
 
+#define cacheline_size          64
+#define cacheline_align         align(cacheline_size)
+
 #define export_symbol(domain, namespace, symbol)\
-    typeof(symbol)* must_emit __SYMEXPORT_Z##domain##_N##namespace##_S##symbol = &(symbol)
+    typeof(symbol)* must_emit __SYMEXPORT_Z##domain##_N##namespace##_S##symbol \
+         = &(symbol)
 
 inline static void noret
 spin()