#define KASSERT(cond) \
do { \
+ extern void Halt(); \
if (!(cond)) { \
Set_Current_Attr(ATTRIB(RED, GRAY|BRIGHT)); \
Print("Failed assertion in %s: %s at %s, line %d, RA=%lx, thread=%p\n",\
(ulong_t) __builtin_return_address(0), \
g_currentThread); \
while (1) \
- ; \
+ Halt(); \
} \
} while (0)
#define TODO(message) \
-do { \
+ do { \
+ extern void Halt(); \
Set_Current_Attr(ATTRIB(BLUE, GRAY|BRIGHT)); \
Print("Unimplemented feature: %s\n", (message)); \
while (1) \
- ; \
+ Halt(); \
} while (0)
/*
* Its behavior does not depend on whether or not this
* is a debug build.
*/
-#define STOP() while (1)
+#define STOP() while (1) {Halt();}
/*
* Panic function.
do { \
Set_Current_Attr(ATTRIB(RED, GRAY|BRIGHT)); \
Print(args); \
- while (1) ; \
+ while (1) Halt(); \
} while (0)
#endif /* GEEKOS_KASSERT_H */
+extern void Halt();
void Spin()
{
// hack - competing thread
- while (1) {};
+ while (1) {Halt();};
}
SerialPrint("RunVMM returned, spinning\n");
- while (1) {}
+ while (1) {Halt();}
TODO("Write a Virtual Machine Monitor");