Lines Matching refs:pcb

116     let pcb = unsafe { process_find_pcb_by_pid(pid).as_mut() };  in signal_kill_proc_info()  localVariable
118 if pcb.is_none() { in signal_kill_proc_info()
126 retval = signal_send_sig_info(sig, info, pcb.unwrap()); in signal_kill_proc_info()
179 pcb: &'a mut process_control_block, in lock_process_sighand()
184 let sighand_ptr = sighand_struct::convert_mut(unsafe { &mut *pcb.sighand }); in lock_process_sighand()
187 kBUG!("Sighand ptr of process {pid} is NULL!", pid = pcb.pid); in lock_process_sighand()
194 let ret = unsafe { ((*pcb).sighand as *mut sighand_struct).as_mut() }; in lock_process_sighand()
202 fn unlock_process_sighand(pcb: &mut process_control_block, flags: u64) { in unlock_process_sighand()
203 let lock = unsafe { &mut (*pcb.sighand).siglock }; in unlock_process_sighand()
215 pcb: &mut process_control_block, in send_signal_locked()
230 return __send_signal_locked(sig, info, pcb, pt, force_send); in send_signal_locked()
244 pcb: &mut process_control_block, in __send_signal_locked()
252 assert!(spin_is_locked(unsafe { &(*pcb.sighand).siglock })); in __send_signal_locked()
254 let _pending: Option<&mut sigpending> = sigpending::convert_mut(&mut pcb.sig_pending); in __send_signal_locked()
257 if sig == SignalNumber::SIGKILL || (pcb.flags & (PF_KTHREAD as u64)) != 0 { in __send_signal_locked()
258 complete_signal(sig, pcb, pt); in __send_signal_locked()
272 fn complete_signal(sig: SignalNumber, pcb: &mut process_control_block, pt: PidType) { in complete_signal()
278 sigset_t::convert_mut(&mut pcb.sig_pending.signal).unwrap(), in complete_signal()
286 let _signal: Option<&mut signal_struct> = signal_struct::convert_mut(pcb.signal); in complete_signal()
291 if wants_signal(sig, pcb) { in complete_signal()
292 _target = Some(pcb); in complete_signal()
312 signal_wake_up(pcb, sig == SignalNumber::SIGKILL); in complete_signal()
320 fn wants_signal(sig: SignalNumber, pcb: &process_control_block) -> bool { in wants_signal()
322 if sig_is_member(sigset_t::convert_ref(&pcb.sig_blocked).unwrap(), sig) { in wants_signal()
327 if (pcb.flags & (PF_EXITING as u64)) > 0 { in wants_signal()
335 if process_is_stopped(pcb) { in wants_signal()
342 return !has_sig_pending(pcb); in wants_signal()
349 fn sig_fatal(pcb: &process_control_block, sig: SignalNumber) -> bool { in sig_fatal()
351 sighand_struct::convert_ref(pcb.sighand).unwrap().action[(sig as usize) - 1] in sig_fatal()
368 fn has_sig_pending(pcb: &process_control_block) -> bool { in has_sig_pending()
369 let ptr = &sigpending::convert_ref(&(*pcb).sig_pending).unwrap().signal; in has_sig_pending()
378 fn signal_wake_up(pcb: &mut process_control_block, fatal: bool) { in signal_wake_up()
384 signal_wake_up_state(pcb, state); in signal_wake_up()
387 fn signal_wake_up_state(pcb: &mut process_control_block, state: u64) { in signal_wake_up_state()
388 assert!(spin_is_locked(&unsafe { (*pcb.sighand).siglock })); in signal_wake_up_state()
392 if !process_wake_up_state(pcb, state | (PROC_INTERRUPTIBLE as u64)) { in signal_wake_up_state()
393 process_kick(pcb); in signal_wake_up_state()
752 pub fn flush_signal_handlers(pcb: *mut process_control_block, force_default: bool) { in flush_signal_handlers()
755 let action = unsafe { &mut (*(*pcb).sighand).action }; in flush_signal_handlers()
886 let pcb = current_pcb(); in do_sigaction() localVariable
890 sigaction::convert_mut(unsafe { &mut (*(pcb.sighand)).action[(sig as usize) - 1] }) in do_sigaction()
893 spin_lock_irq(unsafe { &mut (*(pcb.sighand)).siglock }); in do_sigaction()
896 spin_unlock_irq(unsafe { &mut (*(pcb.sighand)).siglock }); in do_sigaction()
949 let sq = pcb.sig_pending.sigqueue as *mut SigQueue; in do_sigaction()
957 spin_unlock_irq(unsafe { &mut (*(pcb.sighand)).siglock }); in do_sigaction()
1007 let mut pcb = current_pcb(); in set_current_sig_blocked() localVariable
1013 if sigset_equal(&pcb.sig_blocked, new_set) { in set_current_sig_blocked()
1017 let lock: &mut spinlock_t = &mut sighand_struct::convert_mut(pcb.sighand).unwrap().siglock; in set_current_sig_blocked()
1022 pcb.sig_blocked = *new_set; in set_current_sig_blocked()