git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: lunadbg GDB plugin to ease kernel debugging process.
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
compiler.h
diff --git
a/lunaix-os/includes/lunaix/compiler.h
b/lunaix-os/includes/lunaix/compiler.h
index 72bffb713b5c4ec136323ac3d4c4d7d4a6c7437e..f011a0b9df07cd865c81ba2c7e741ee87c5598ca 100644
(file)
--- a/
lunaix-os/includes/lunaix/compiler.h
+++ b/
lunaix-os/includes/lunaix/compiler.h
@@
-7,4
+7,17
@@
#define weak_alias(name) __attribute__((weak, alias(name)))
#define weak __attribute__((weak))
#define noret __attribute__((noreturn))
#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 */
#endif /* __LUNAIX_COMPILER_H */