xref: /DragonOS/kernel/src/smp/mod.rs (revision 83ed0ebc293d5a10245089f627f52770fd5b9dd4)
1 use crate::{
2     arch::interrupt::ipi::send_ipi,
3     exception::ipi::{IpiKind, IpiTarget},
4     syscall::SystemError,
5 };
6 
7 pub mod c_adapter;
8 pub mod core;
9 pub mod cpu;
10 
11 pub fn kick_cpu(cpu_id: u32) -> Result<(), SystemError> {
12     // todo: 增加对cpu_id的有效性检查
13 
14     send_ipi(IpiKind::KickCpu, IpiTarget::Specified(cpu_id as usize));
15     return Ok(());
16 }
17