You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
423 B
Rust
20 lines
423 B
Rust
5 years ago
|
// SPDX-License-Identifier: MIT
|
||
|
//
|
||
|
// Copyright (c) 2018-2019 Andre Richter <andre.o.richter@gmail.com>
|
||
|
|
||
|
//! A panic handler that infinitely waits.
|
||
|
|
||
|
use crate::println;
|
||
|
use core::panic::PanicInfo;
|
||
|
|
||
|
#[panic_handler]
|
||
|
fn panic(info: &PanicInfo) -> ! {
|
||
|
if let Some(args) = info.message() {
|
||
|
println!("Kernel panic: {}", args);
|
||
|
} else {
|
||
|
println!("Kernel panic!");
|
||
|
}
|
||
|
|
||
5 years ago
|
crate::arch::wait_forever()
|
||
5 years ago
|
}
|