mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-27 07:53:23 +00:00
修正由于init proc union导致的无法运行的问题 && 修正由于内核线程启动后默认sleep的行为导致init进程无法正常运行的bug (#381)
1. 修正由于init proc union导致的无法运行的问题 2. 修正由于内核线程启动后默认sleep的行为导致init进程无法正常运行的bug
This commit is contained in:
@ -42,6 +42,19 @@ extern "C" {
|
||||
fn ret_from_intr();
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[repr(align(32768))]
|
||||
union InitProcUnion {
|
||||
/// 用于存放idle进程的内核栈
|
||||
idle_stack: [u8; 32768],
|
||||
}
|
||||
|
||||
#[link_section = ".data.init_proc_union"]
|
||||
#[no_mangle]
|
||||
static BSP_IDLE_STACK_SPACE: InitProcUnion = InitProcUnion {
|
||||
idle_stack: [0; 32768],
|
||||
};
|
||||
|
||||
/// PCB中与架构相关的信息
|
||||
#[derive(Debug, Clone)]
|
||||
#[allow(dead_code)]
|
||||
@ -321,6 +334,7 @@ impl ProcessManager {
|
||||
);
|
||||
// kdebug!("switch tss ok");
|
||||
|
||||
compiler_fence(Ordering::SeqCst);
|
||||
// 正式切换上下文
|
||||
switch_to_inner(prev_arch, next_arch);
|
||||
}
|
||||
|
Reference in New Issue
Block a user