Lines Matching refs:pcb

42 pub fn loads_balance(pcb: &mut process_control_block) {  in loads_balance()
47 let mut min_loads_cpu_id = pcb.cpu_id; in loads_balance()
48 let mut min_loads = get_cpu_loads(pcb.cpu_id); in loads_balance()
59 if (min_loads_cpu_id != pcb.cpu_id) && (pcb.flags & (PF_NEED_MIGRATE as u64)) == 0 { in loads_balance()
61 pcb.flags |= PF_NEED_MIGRATE as u64; in loads_balance()
62 pcb.migrate_to = min_loads_cpu_id; in loads_balance()
72 fn enqueue(&mut self, pcb: &'static mut process_control_block); in enqueue()
103 pub extern "C" fn sched_enqueue(pcb: &'static mut process_control_block, mut reset_time: bool) { in sched_enqueue()
107 if pcb.state & (PROC_RUNNING as u64) == 0 { in sched_enqueue()
114 if pcb.pid > 0 { in sched_enqueue()
115 loads_balance(pcb); in sched_enqueue()
119 if (pcb.flags & (PF_NEED_MIGRATE as u64)) != 0 { in sched_enqueue()
121 pcb.flags &= !(PF_NEED_MIGRATE as u64); in sched_enqueue()
122 pcb.cpu_id = pcb.migrate_to; in sched_enqueue()
127 if pcb.policy == SCHED_NORMAL { in sched_enqueue()
129 cfs_scheduler.enqueue_reset_vruntime(pcb); in sched_enqueue()
131 cfs_scheduler.enqueue(pcb); in sched_enqueue()
133 } else if pcb.policy == SCHED_FIFO || pcb.policy == SCHED_RR { in sched_enqueue()
134 rt_scheduler.enqueue(pcb); in sched_enqueue()
172 pub extern "C" fn sched_set_cpu_idle(cpu_id: usize, pcb: *mut process_control_block) { in sched_set_cpu_idle()
173 __get_cfs_scheduler().set_cpu_idle(cpu_id, pcb); in sched_set_cpu_idle()
183 pcb: &'static mut process_control_block, in sched_migrate_process()
191 pcb.flags |= PF_NEED_MIGRATE as u64; in sched_migrate_process()
192 pcb.migrate_to = target as u32; in sched_migrate_process()