signal的发送(暂时父子进程之间共享信号及相应的结构体) (#89)

* 解决由于spinlock.h中包含preempt_enable()带来的循环include问题

* new: 初步实现signal的数据结构

* new:signal相关数据结构

* fix: 解决bindings.rs报一堆警告的问题

* new: rust下的kdebug kinfo kwarn kBUG kerror宏

* 移动asm.h和cmpxchg.h

* new: signal的发送(暂时只支持父子进程共享信号及处理函数)
This commit is contained in:
login
2022-11-23 11:38:20 +08:00
committed by GitHub
parent 3d729e2069
commit 66f67c6a95
44 changed files with 1677 additions and 472 deletions

14
kernel/src/smp/core.rs Normal file
View File

@ -0,0 +1,14 @@
/// @brief 获取当前的cpu id
#[inline]
pub fn smp_get_processor_id() -> u32 {
if cfg!(x86_64) {
return crate::arch::x86_64::cpu::arch_current_apic_id() as u32;
} else {
255
}
}
#[inline]
pub fn smp_send_reschedule(_cpu: u32) {
// todo:
}

1
kernel/src/smp/mod.rs Normal file
View File

@ -0,0 +1 @@
pub mod core;