1 /* The kernel call that is implemented in this file:
4 * The parameters for this kernel call are:
5 * m2_i1: SIG_PROC # process for which PM is done
10 #include <sys/sigcontext.h>
14 /*===========================================================================*
16 *===========================================================================*/
17 PUBLIC
int do_endksig(m_ptr
)
18 message
*m_ptr
; /* pointer to request message */
20 /* Finish up after a kernel type signal, caused by a SYS_KILL message or a
21 * call to cause_sig by a task. This is called by the PM after processing a
22 * signal it got with SYS_GETKSIG.
24 register struct proc
*rp
;
26 /* Get process pointer and verify that it had signals pending. If the
27 * process is already dead its flags will be reset.
29 rp
= proc_addr(m_ptr
->SIG_PROC
);
30 if (! (rp
->p_rts_flags
& SIG_PENDING
)) return(EINVAL
);
32 /* PM has finished one kernel signal. Perhaps process is ready now? */
33 if (! (rp
->p_rts_flags
& SIGNALED
)) /* new signal arrived */
34 if ((rp
->p_rts_flags
&= ~SIG_PENDING
)==0) /* remove pending flag */
35 lock_enqueue(rp
); /* ready if no flags */
39 #endif /* USE_ENDKSIG */