Unifying the Lunaix's Physical Memory Model (#28)
[lunaix-os.git] / lunaix-os / kernel / spike.c
index 91fe9f69694c3cc8939d34964d448a108e4e3a94..4c1bb032b1cdf8ab5fbb3eee1428c22bb81ceb5d 100644 (file)
@@ -3,6 +3,7 @@
 #include <lunaix/pcontext.h>
 #include <lunaix/syslog.h>
 #include <lunaix/trace.h>
+#include <lunaix/failsafe.h>
 
 LOG_MODULE("spike")
 
@@ -13,9 +14,8 @@ __assert_fail(const char* expr, const char* file, unsigned int line)
     //  the stack context being preserved
     cpu_disable_interrupt();
     ERROR("assertion fail (%s:%u)\n\t%s", file, line, expr);
-    trace_printstack();
-
-    spin(); // never reach
+    
+    failsafe_diagnostic();
 }
 
 void noret