Patch add abort func (#120)

* 对于除了sigkill以外的信号,也加入队列

* bugfix:libc中,注册信号处理函数时,总是注册sigkill的问题

* 增加getpid系统调用

* 增加了raise、kill、abort
This commit is contained in:
login
2022-12-19 15:03:44 +08:00
committed by GitHub
parent 47f0d12a1f
commit c588d6f77f
13 changed files with 155 additions and 52 deletions

View File

@ -22,6 +22,7 @@ extern uint64_t sys_unlink_at(struct pt_regs *regs);
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);
/**
* @brief 导出系统调用处理函数的符号
@ -590,6 +591,7 @@ system_call_t system_call_table[MAX_SYSTEM_CALL_NUM] = {
[23] = sys_kill,
[24] = sys_sigaction,
[25] = sys_rt_sigreturn,
[26 ... 254] = system_call_not_exists,
[26] = sys_getpid,
[27 ... 254] = system_call_not_exists,
[255] = sys_ahci_end_req,
};

View File

@ -37,5 +37,6 @@
#define SYS_KILL 23 // kill一个进程(向这个进程发出信号)
#define SYS_SIGACTION 24 // 设置进程的信号处理动作
#define SYS_RT_SIGRETURN 25 // 从信号处理函数返回
#define SYS_GETPID 26 // 获取当前进程的pid进程标识符
#define SYS_AHCI_END_REQ 255 // AHCI DMA请求结束end_request的系统调用