/// Dequeues and handles a pending signal for `current_task`.
Dequeues and handles a pending signal for `current_task`.
Dequeues and handles a pending signal for ` current_task ` .
pub fn dequeue_signal(current_task: &mut CurrentTask) {
    let task = current_task.task_arc_clone();
    let mut signal_state = task.signals.write();
    if let Some(signal) = next_pending_signal(&signal_state) {
        let sigaction = task.signal_actions.get(signal);
        let action = action_for_signal(signal, sigaction);
        match action {
            DeliveryAction::CallHandler => {
                dispatch_signal_handler(current_task, &mut signal_state, signal, sigaction);
            }
            DeliveryAction::Ignore => {}
            _ => not_implemented!("Unimplemented signal delivery action {:?}", action),
        };
        // This unwrap is safe since we checked the signal comes from the signals collection.
        *signal_state.pending.get_mut(&signal).unwrap() -= 1;
    }
}
pub fn dequeue_signal ( current_task : & mut CurrentTask ) { let task = current_task . task_arc_clone ( ) ; let mut signal_state = task . signals . write ( ) ; if let Some ( signal ) = next_pending_signal ( & signal_state ) { let sigaction = task . signal_actions . get ( signal ) ; let action = action_for_signal ( signal , sigaction ) ; match action { DeliveryAction :: CallHandler => { dispatch_signal_handler ( current_task , & mut signal_state , signal , sigaction ) ; } DeliveryAction :: Ignore => { } _ => not_implemented ! ( " " action ) , } ; // This unwrap is safe since we checked the signal comes from the signals collection. * signal_state . pending . get_mut ( & signal ) . unwrap ( ) -= 1 ; } }
Dequeues and handles a pending signal for `current_task`.
Dequeues and handles a pending signal for ` current_task ` .
current_task
&mut CurrentTask