Something went wrong. Try again.
[WIP] A toy kernel written in Zig
Something went wrong. Try again.
1234567891011121314151617181920const std = @import("std");
const kernel = @import("root.zig");
fn panicHandler(msg: []const u8, first_trace_addr: ?usize) noreturn { _ = first_trace_addr;
if (@inComptime()) { @compileError(msg); }
kernel.uart.putStr("panic: "); kernel.uart.putStr(msg); kernel.uart.putChar('\n');
kernel.syscon.action(.poweroff);}
pub const panic = std.debug.FullPanic(panicHandler);