slight tuning of /etc/mk situation when making release.
[minix.git] / kernel / system / do_endksig.c
blob1b09b894c9315632f7b3070b8ca1b6bcedefe158
1 /* The kernel call that is implemented in this file:
2 * m_type: SYS_ENDKSIG
4 * The parameters for this kernel call are:
5 * m2_i1: SIG_ENDPT # process for which PM is done
6 */
8 #include "../system.h"
10 #if USE_ENDKSIG
12 /*===========================================================================*
13 * do_endksig *
14 *===========================================================================*/
15 PUBLIC int do_endksig(struct proc * caller, message * m_ptr)
17 /* Finish up after a kernel type signal, caused by a SYS_KILL message or a
18 * call to cause_sig by a task. This is called by the PM after processing a
19 * signal it got with SYS_GETKSIG.
21 register struct proc *rp;
22 int proc_nr;
24 /* Get process pointer and verify that it had signals pending. If the
25 * process is already dead its flags will be reset.
27 if(!isokendpt(m_ptr->SIG_ENDPT, &proc_nr))
28 return EINVAL;
30 rp = proc_addr(proc_nr);
31 if (!RTS_ISSET(rp, RTS_SIG_PENDING)) return(EINVAL);
33 /* PM has finished one kernel signal. Perhaps process is ready now? */
34 if (!RTS_ISSET(rp, RTS_SIGNALED)) /* new signal arrived */
35 RTS_UNSET(rp, RTS_SIG_PENDING); /* remove pending flag */
36 return(OK);
39 #endif /* USE_ENDKSIG */