1 /* The kernel call that is implemented in this file:
4 * The parameters for this kernel call are:
5 * m_sigcalls.endpt # process for which PM is done
8 #include "kernel/system.h"
12 /*===========================================================================*
14 *===========================================================================*/
15 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 a signal manager after
19 * processing a signal it got with SYS_GETKSIG.
21 register struct proc
*rp
;
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
->m_sigcalls
.endpt
, &proc_nr
))
30 rp
= proc_addr(proc_nr
);
31 if (caller
->p_endpoint
!= priv(rp
)->s_sig_mgr
) return(EPERM
);
32 if (!RTS_ISSET(rp
, RTS_SIG_PENDING
)) return(EINVAL
);
34 /* The signal manager has finished one kernel signal. Is the process ready? */
35 if (!RTS_ISSET(rp
, RTS_SIGNALED
)) /* new signal arrived */
36 RTS_UNSET(rp
, RTS_SIG_PENDING
); /* remove pending flag */
40 #endif /* USE_ENDKSIG */