xref: /DragonOS/kernel/src/init/mod.rs (revision 01c18c64b14b4ebabd98fa92c587c26874275eb1)
1 use crate::libs::rwlock::RwLock;
2 
3 use self::boot::BootParams;
4 pub mod boot;
5 pub mod cmdline;
6 #[allow(clippy::module_inception)]
7 pub mod init;
8 pub mod initcall;
9 pub mod initial_kthread;
10 
11 /// 启动参数
12 static BOOT_PARAMS: RwLock<BootParams> = RwLock::new(BootParams::new());
13 
14 #[inline(always)]
15 pub fn boot_params() -> &'static RwLock<BootParams> {
16     &BOOT_PARAMS
17 }
18 
19 #[inline(never)]
20 fn init_intertrait() {
21     intertrait::init_caster_map();
22 }
23