gila/src/kernel/panic.rs
August c6e032d9c9
All checks were successful
Continuous Integration / Check (push) Successful in 42s
Continuous Integration / Clippy (push) Successful in 40s
Back to one crate. idk what I was doing earlier
2026-06-30 20:45:09 +00: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();
}
}