Lines Matching refs:pcb

92     let pcb = unsafe { process_find_pcb_by_pid(pid).as_mut() };  in signal_kill_proc_info()  localVariable
94 if pcb.is_none() { in signal_kill_proc_info()
102 retval = signal_send_sig_info(sig, info, pcb.unwrap()); in signal_kill_proc_info()
155 pcb: &'a mut process_control_block, in lock_process_sighand()
160 let sighand_ptr = sighand_struct::convert_mut(unsafe { &mut *pcb.sighand }); in lock_process_sighand()
163 kBUG!("Sighand ptr of process {pid} is NULL!", pid = pcb.pid); in lock_process_sighand()
170 let ret = unsafe { ((*pcb).sighand as *mut sighand_struct).as_mut() }; in lock_process_sighand()
178 fn unlock_process_sighand(pcb: &mut process_control_block, flags: usize) { in unlock_process_sighand()
179 let lock = unsafe { &mut (*pcb.sighand).siglock }; in unlock_process_sighand()
191 pcb: &mut process_control_block, in send_signal_locked()
206 return __send_signal_locked(sig, info, pcb, pt, force_send); in send_signal_locked()
220 pcb: &mut process_control_block, in __send_signal_locked()
227 assert!(spin_is_locked(unsafe { &(*pcb.sighand).siglock })); in __send_signal_locked()
229 let _pending: Option<&mut sigpending> = sigpending::convert_mut(&mut pcb.sig_pending); in __send_signal_locked()
232 if sig == SignalNumber::SIGKILL || (pcb.flags & (PF_KTHREAD as u64)) != 0 { in __send_signal_locked()
233 complete_signal(sig, pcb, pt); in __send_signal_locked()
251 complete_signal(sig, pcb, pt); in __send_signal_locked()
262 fn complete_signal(sig: SignalNumber, pcb: &mut process_control_block, pt: PidType) { in complete_signal()
268 sigset_t::convert_mut(&mut pcb.sig_pending.signal).unwrap(), in complete_signal()
276 let _signal: Option<&mut signal_struct> = signal_struct::convert_mut(pcb.signal); in complete_signal()
281 if wants_signal(sig, pcb) { in complete_signal()
282 _target = Some(pcb); in complete_signal()
302 signal_wake_up(pcb, sig == SignalNumber::SIGKILL); in complete_signal()
310 fn wants_signal(sig: SignalNumber, pcb: &process_control_block) -> bool { in wants_signal()
312 if sig_is_member(sigset_t::convert_ref(&pcb.sig_blocked).unwrap(), sig) { in wants_signal()
317 if (pcb.flags & (PF_EXITING as u64)) > 0 { in wants_signal()
325 if process_is_stopped(pcb) { in wants_signal()
332 return !has_sig_pending(pcb); in wants_signal()
339 fn sig_fatal(pcb: &process_control_block, sig: SignalNumber) -> bool { in sig_fatal()
341 sighand_struct::convert_ref(pcb.sighand).unwrap().action[(sig as usize) - 1] in sig_fatal()
358 fn has_sig_pending(pcb: &process_control_block) -> bool { in has_sig_pending()
359 let ptr = &sigpending::convert_ref(&(*pcb).sig_pending).unwrap().signal; in has_sig_pending()
368 fn signal_wake_up(pcb: &mut process_control_block, fatal: bool) { in signal_wake_up()
374 signal_wake_up_state(pcb, state); in signal_wake_up()
377 fn signal_wake_up_state(pcb: &mut process_control_block, state: u64) { in signal_wake_up_state()
378 assert!(spin_is_locked(&unsafe { (*pcb.sighand).siglock })); in signal_wake_up_state()
382 if !process_wake_up_state(pcb, state | (PROC_INTERRUPTIBLE as u64)) { in signal_wake_up_state()
383 process_kick(pcb); in signal_wake_up_state()
767 pub fn flush_signal_handlers(pcb: *mut process_control_block, force_default: bool) { in flush_signal_handlers()
770 let action = unsafe { &mut (*(*pcb).sighand).action }; in flush_signal_handlers()
790 let pcb = current_pcb(); in do_sigaction() localVariable
794 sigaction::convert_mut(unsafe { &mut (*(pcb.sighand)).action[(sig as usize) - 1] }) in do_sigaction()
797 spin_lock_irq(unsafe { &mut (*(pcb.sighand)).siglock }); in do_sigaction()
800 spin_unlock_irq(unsafe { &mut (*(pcb.sighand)).siglock }); in do_sigaction()
853 let sq: &mut SigQueue = SigQueue::from_c_void(pcb.sig_pending.sigqueue); in do_sigaction()
860 spin_unlock_irq(unsafe { &mut (*(pcb.sighand)).siglock }); in do_sigaction()
904 let mut pcb = current_pcb(); in set_current_sig_blocked() localVariable
910 if sigset_equal(&pcb.sig_blocked, new_set) { in set_current_sig_blocked()
914 let lock: &mut spinlock_t = &mut sighand_struct::convert_mut(pcb.sighand).unwrap().siglock; in set_current_sig_blocked()
919 pcb.sig_blocked = *new_set; in set_current_sig_blocked()