From: Ben Gras Date: Wed, 25 Oct 2006 13:38:31 +0000 (+0000) Subject: Part of wait()/waitpid() fix in revision 2629:2634 in PM - kernel X-Git-Tag: v3.1.3~160 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/addsub.png?a=commitdiff_plain;h=65a1d219637f05e74689be63baf4fe056fb1a0db;p=minix.git Part of wait()/waitpid() fix in revision 2629:2634 in PM - kernel unblocks a process that has no priority (stopped with sys_nice() and PRIO_STOP) and reschedules it if that gives it RTS flags of 0. --- diff --git a/kernel/system/do_sigsend.c b/kernel/system/do_sigsend.c index 9e082b6f7..5e84bc374 100644 --- a/kernel/system/do_sigsend.c +++ b/kernel/system/do_sigsend.c @@ -77,6 +77,12 @@ message *m_ptr; /* pointer to request message */ rp->p_reg.sp = (reg_t) frp; rp->p_reg.pc = (reg_t) smsg.sm_sighandler; + /* Reschedule if necessary. */ + if(rp->p_rts_flags & NO_PRIORITY) { + rp->p_rts_flags &= ~NO_PRIORITY; + if (rp->p_rts_flags == 0) lock_enqueue(rp); + } else kprintf("system: warning: sigsend a running process\n"); + return(OK); }