refactor: make pci device driver loading passive, pci bus scanner will not load them...
[lunaix-os.git] / lunaix-os / includes / lunaix / compiler.h
index a97c8c5732df99854783832d0a639f6e6adc6387..f011a0b9df07cd865c81ba2c7e741ee87c5598ca 100644 (file)
@@ -5,5 +5,19 @@
 #define unlikely(x) __builtin_expect((x), 0)
 
 #define weak_alias(name) __attribute__((weak, alias(name)))
+#define weak __attribute__((weak))
 #define noret __attribute__((noreturn))
+
+#define stringify(v) #v
+#define stringify__(v) stringify(v)
+
+inline static void noret
+spin()
+{
+    volatile int __infloop = 1;
+    while (__infloop)
+        ;
+    __builtin_unreachable();
+}
+
 #endif /* __LUNAIX_COMPILER_H */