Enable check of atomic mode

This commit is contained in:
jellllly420
2024-08-22 21:17:38 +08:00
committed by Tate, Hongliang Tian
parent 4231645c02
commit 32a1a53ee7
6 changed files with 58 additions and 16 deletions

View File

@ -44,6 +44,8 @@ pub mod task;
pub mod trap;
pub mod user;
use core::sync::atomic::AtomicBool;
pub use ostd_macros::main;
pub use ostd_pod::Pod;
@ -96,6 +98,9 @@ pub unsafe fn init() {
invoke_ffi_init_funcs();
}
/// Indicates whether the kernel is in bootstrap context.
pub 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
/// the components.