Decoupling Architectural-specific Code (#35)
[lunaix-os.git] / lunaix-os / arch / generic / includes / sys / failsafe.h
diff --git a/lunaix-os/arch/generic/includes/sys/failsafe.h b/lunaix-os/arch/generic/includes/sys/failsafe.h
new file mode 100644 (file)
index 0000000..26020cd
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef __LUNAIX_FAILSAFE_H
+#define __LUNAIX_FAILSAFE_H
+
+#define STACK_SANITY            0xbeefc0de
+
+#ifndef __ASM__
+
+#include <lunaix/types.h>
+
+static inline bool
+check_bootstack_sanity()
+{
+    return true;
+}
+
+static inline void must_inline noret
+failsafe_diagnostic() {
+    unreachable;
+}
+
+#endif
+
+#endif /* __LUNAIX_FAILSAFE_H */