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