Use entry_point macro in lib.rs too

This commit is contained in:
Philipp Oppermann
2019-04-26 12:00:51 +02:00
parent 2e531850b8
commit c8821cb226

View File

@@ -57,10 +57,15 @@ pub fn hlt_loop() -> ! {
} }
} }
#[cfg(test)]
use bootloader::{entry_point, BootInfo};
#[cfg(test)]
entry_point!(test_kernel_main);
/// Entry point for `cargo xtest` /// Entry point for `cargo xtest`
#[cfg(test)] #[cfg(test)]
#[no_mangle] fn test_kernel_main(_boot_info: &'static BootInfo) -> ! {
pub extern "C" fn _start() -> ! {
init(); init();
test_main(); test_main();
hlt_loop(); hlt_loop();