xref: /DragonOS/kernel/src/smp/mod.rs (revision 70a4e5550a9fb49b537092287c3ddc36448c5b78)
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