mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-24 17:23:23 +00:00
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:
14
kernel/src/smp/core.rs
Normal file
14
kernel/src/smp/core.rs
Normal 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
1
kernel/src/smp/mod.rs
Normal file
@ -0,0 +1 @@
|
||||
pub mod core;
|
Reference in New Issue
Block a user