Patch fix sched and net lockdep error (#479)

- fix: 修复调度器,软中断,定时器,网络子系统的部分锁的使用不符合锁依赖安全规范的问题
- fix: 修复创建pcb时内核栈爆栈的问题
- 把异常的trap gate改成intr gate

---------

Co-authored-by: GnoCiYeH <heyicong@dragonos.org>
This commit is contained in:
LoGin
2023-12-27 14:27:12 +08:00
committed by GitHub
parent 91e9d4ab55
commit 0d6cf65aa1
28 changed files with 406 additions and 246 deletions

View File

@ -67,7 +67,11 @@ macro_rules! syscall_return {
pub extern "sysv64" fn syscall_handler(frame: &mut TrapFrame) -> () {
let syscall_num = frame.rax as usize;
// 防止sys_sched由于超时无法退出导致的死锁
if syscall_num != SYS_SCHED {
if syscall_num == SYS_SCHED {
unsafe {
CurrentIrqArch::interrupt_disable();
}
} else {
unsafe {
CurrentIrqArch::interrupt_enable();
}