mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-18 12:06:43 +00:00
Implement should_panic for ktest and clear the codebase
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
bb0560530f
commit
45a6b2f46c
@ -1,23 +1,17 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
// The `no_mangle`` attribute for the `jinux_main` entrypoint requires the removal of safety check.
|
||||
// The `export_name` attribute for the `jinux_main` entrypoint requires the removal of safety check.
|
||||
// Please be aware that the kernel is not allowed to introduce any other unsafe operations.
|
||||
// #![forbid(unsafe_code)]
|
||||
extern crate jinux_frame;
|
||||
|
||||
use core::panic::PanicInfo;
|
||||
use jinux_frame::println;
|
||||
|
||||
#[no_mangle]
|
||||
pub fn jinux_main() -> ! {
|
||||
#[export_name = "jinux_main"]
|
||||
pub fn main() -> ! {
|
||||
jinux_frame::init();
|
||||
println!("[kernel] finish init jinux_frame");
|
||||
component::init_all(component::parse_metadata!()).unwrap();
|
||||
jinux_std::init();
|
||||
jinux_std::run_first_process();
|
||||
}
|
||||
|
||||
#[panic_handler]
|
||||
fn panic(info: &PanicInfo) -> ! {
|
||||
jinux_frame::panic_handler(info);
|
||||
}
|
||||
|
Reference in New Issue
Block a user