Add Klog.fatal_error()
This commit is contained in:
1 parent
e8978c73f2
commit
3412d9ece9
2 files changed
+15
-1
No files matched your search
@@ -6,6 +6,7 @@ module hulk.klog;
|
||||
import core.stdc.stdarg;
|
||||
import hulk.console;
|
||||
static import hulk.writef;
|
||||
import hulk.cpu;
|
||||
|
||||
struct Klog
|
||||
{
|
||||
@@ -70,4 +71,17 @@ struct Klog
|
||||
writef("\n", args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a fatal kernel error and loop forever.
|
||||
*/
|
||||
public static void fatal_error(T...)(T args)
|
||||
{
|
||||
writef("FATAL ERROR: ");
|
||||
writefln(args);
|
||||
cli();
|
||||
for (;;)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user