Finish bootstrap once finishing the initialization of OSTD

This commit is contained in:
Chen Chengjun
2024-10-29 10:49:19 +08:00
committed by Tate, Hongliang Tian
parent 878f3f3760
commit b17cbb2408
2 changed files with 4 additions and 5 deletions

View File

@ -46,7 +46,7 @@ pub mod timer;
pub mod trap;
pub mod user;
use core::sync::atomic::AtomicBool;
use core::sync::atomic::{AtomicBool, Ordering};
pub use ostd_macros::{main, panic_handler};
pub use ostd_pod::Pod;
@ -100,10 +100,12 @@ unsafe fn init() {
arch::irq::enable_local();
invoke_ffi_init_funcs();
IN_BOOTSTRAP_CONTEXT.store(false, Ordering::Relaxed);
}
/// Indicates whether the kernel is in bootstrap context.
pub static IN_BOOTSTRAP_CONTEXT: AtomicBool = AtomicBool::new(true);
pub(crate) static IN_BOOTSTRAP_CONTEXT: AtomicBool = AtomicBool::new(true);
/// Invoke the initialization functions defined in the FFI.
/// The component system uses this function to call the initialization functions of