mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-21 18:33:23 +00:00
bugfix:修复当使用sched()运行调度器,在切换进程的时候,由于不在中断上下文内,导致当前进程的上下文丢失的问题。 (#130)
bugfix:修复当使用sched()运行调度器,在切换进程的时候,由于不在中断上下文内,导致当前进程的上下文丢失的问题。 bugfix:修复切换进程的宏的汇编代码的损坏部分,未声明rax寄存器,从而导致的编译器未定义行为问题。
This commit is contained in:
@ -23,6 +23,7 @@ extern uint64_t sys_kill(struct pt_regs *regs);
|
||||
extern uint64_t sys_sigaction(struct pt_regs * regs);
|
||||
extern uint64_t sys_rt_sigreturn(struct pt_regs * regs);
|
||||
extern uint64_t sys_getpid(struct pt_regs * regs);
|
||||
extern uint64_t sys_sched(struct pt_regs * regs);
|
||||
|
||||
/**
|
||||
* @brief 导出系统调用处理函数的符号
|
||||
@ -592,6 +593,7 @@ system_call_t system_call_table[MAX_SYSTEM_CALL_NUM] = {
|
||||
[24] = sys_sigaction,
|
||||
[25] = sys_rt_sigreturn,
|
||||
[26] = sys_getpid,
|
||||
[27 ... 254] = system_call_not_exists,
|
||||
[27] = sys_sched,
|
||||
[28 ... 254] = system_call_not_exists,
|
||||
[255] = sys_ahci_end_req,
|
||||
};
|
||||
|
@ -37,6 +37,7 @@
|
||||
#define SYS_KILL 23 // kill一个进程(向这个进程发出信号)
|
||||
#define SYS_SIGACTION 24 // 设置进程的信号处理动作
|
||||
#define SYS_RT_SIGRETURN 25 // 从信号处理函数返回
|
||||
#define SYS_GETPID 26 // 获取当前进程的pid(进程标识符)
|
||||
#define SYS_GETPID 26 // 获取当前进程的pid(进程标识符)
|
||||
#define SYS_SCHED 27 // 让系统立即运行调度器(该系统调用不能由运行在Ring3的程序发起)
|
||||
|
||||
#define SYS_AHCI_END_REQ 255 // AHCI DMA请求结束end_request的系统调用
|
Reference in New Issue
Block a user