gila/kernel/src/panic.rs
August 88fe204b02
Some checks failed
Continuous Integration / Check (push) Successful in 1m57s
Continuous Integration / Clippy (push) Has been cancelled
Convert to workspace
2025-11-13 17:09:20 -05:00

18 lines
493 B
Rust

// Copyright (c) 2025 shibedrill
// SPDX-License-Identifier: MIT
use core::panic::*;
use crate::format;
use crate::{LOGGER, LogLevel};
#[panic_handler]
pub fn panic(info: &PanicInfo) -> ! {
log_critical!("Panic in {}: {}", info.location().unwrap(), info.message());
// TODO: If any userspace facilities are still working, *attempt* to flush panic info and
// logs to disk or whatever else. Then kill all processes and reboot.
loop {
crate::arch::asm::nop();
}
}