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