pluto/src/kernel/panic.zig

14 lines
415 B
Zig
Raw Normal View History

const builtin = @import("builtin");
const tty = @import("tty.zig");
const arch = @import("arch.zig").internals;
const log = @import("log.zig");
pub fn panic(trace: ?*builtin.StackTrace, comptime format: []const u8, args: ...) noreturn {
@setCold(true);
arch.disableInterrupts();
log.logInfo("KERNEL PANIC\n");
log.logInfo(format, args);
log.logInfo("HALTING\n");
arch.haltNoInterrupts();
}