mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
Patch add abort func (#120)
* 对于除了sigkill以外的信号,也加入队列 * bugfix:libc中,注册信号处理函数时,总是注册sigkill的问题 * 增加getpid系统调用 * 增加了raise、kill、abort
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
use crate::{include::bindings::bindings::pt_regs, arch::x86_64::asm::current::current_pcb};
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[repr(u8)]
|
||||
@ -15,4 +17,12 @@ impl PartialEq for PidType {
|
||||
fn eq(&self, other: &PidType) -> bool {
|
||||
*self as u8 == *other as u8
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取当前进程的pid
|
||||
*/
|
||||
#[no_mangle]
|
||||
pub extern "C" fn sys_getpid(_regs: &pt_regs)->u64{
|
||||
return current_pcb().pid as u64;
|
||||
}
|
Reference in New Issue
Block a user