2019-05-31 08:41:28 +02:00
|
|
|
// Zig version: 0.4.0
|
|
|
|
|
|
|
|
const builtin = @import("builtin");
|
|
|
|
const tty = @import("tty.zig");
|
2019-09-08 21:48:23 +02:00
|
|
|
const arch = @import("arch.zig").internals;
|
2019-05-31 08:41:28 +02:00
|
|
|
|
|
|
|
pub fn panicFmt(trace: ?*builtin.StackTrace, comptime format: []const u8, args: ...) noreturn {
|
|
|
|
@setCold(true);
|
|
|
|
tty.print("KERNEL PANIC\n");
|
|
|
|
tty.print(format, args);
|
|
|
|
tty.print("\nHALTING\n");
|
|
|
|
arch.haltNoInterrupts();
|
|
|
|
}
|