Lines Matching refs:cpu
36 smp::{core::smp_get_processor_id, cpu::ProcessorId},
66 pub fn cpu_irq_time(cpu: usize) -> &'static mut IrqTime { in cpu_irq_time()
67 unsafe { CPU_IRQ_TIME.as_mut().unwrap()[cpu] } in cpu_irq_time()
71 pub fn cpu_rq(cpu: usize) -> Arc<CpuRunQueue> { in cpu_rq()
76 .force_get(ProcessorId::new(cpu as u32)) in cpu_rq()
292 cpu: usize, field
332 pub fn new(cpu: usize) -> Self { in new()
336 cpu, in new()
516 let clock = SchedClock::sched_clock_cpu(self.cpu); in update_rq_clock()
529 let mut irq_delta = irq_time_read(self.cpu) - self.prev_irq_time; in update_rq_clock_task()
639 let cpu = self.cpu; in resched_current() localVariable
641 if cpu == smp_get_processor_id().data() as usize { in resched_current()
656 send_resched_ipi(ProcessorId::new(cpu as u32)); in resched_current()
831 let cpu = smp_get_processor_id().data() as usize; in __schedule() localVariable
832 let rq = cpu_rq(cpu); in __schedule()
970 fn __set_task_cpu(pcb: &Arc<ProcessControlBlock>, cpu: ProcessorId) { in __set_task_cpu()
973 let rq = cpu_rq(cpu.data() as usize); in __set_task_cpu()
988 for cpu in 0..PerCpu::MAX_CPU_NUM as usize { in sched_init()
989 let rq = Arc::new(CpuRunQueue::new(cpu)); in sched_init()
999 pub fn send_resched_ipi(cpu: ProcessorId) { in send_resched_ipi()
1000 send_ipi(IpiKind::KickCpu, IpiTarget::Specified(cpu)); in send_resched_ipi()