1 use crate::{include::bindings::bindings::process_control_block, process::process::process_cpu, arch::x86_64::asm::current::current_pcb}; 2 3 /// @brief 获取指定的cpu上正在执行的进程的pcb 4 #[inline] cpu_executing(cpu_id:u32) -> *const process_control_block5pub fn cpu_executing(cpu_id:u32) -> *const process_control_block{ 6 // todo: 引入per_cpu之后,该函数真正执行“返回指定的cpu上正在执行的pcb”的功能 7 8 if cpu_id == process_cpu(current_pcb()){ 9 return current_pcb(); 10 }else { 11 todo!() 12 } 13 }