From: Tomas Hruby Date: Tue, 6 Apr 2010 11:18:04 +0000 (+0000) Subject: RTS_SYS_LOCK and do_runctl() X-Git-Tag: v3.1.7~179 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/named.html?a=commitdiff_plain;h=b0d37b81c416374000007a92d2e6f3a2570f9e90;p=minix.git RTS_SYS_LOCK and do_runctl() - No need for RTS_SYS_LOCK as there are no tasks anymore. --- diff --git a/kernel/proc.h b/kernel/proc.h index b4b38155a..a059ecf70 100644 --- a/kernel/proc.h +++ b/kernel/proc.h @@ -128,7 +128,6 @@ struct proc { #define RTS_PAGEFAULT 0x400 /* process has unhandled pagefault */ #define RTS_VMREQUEST 0x800 /* originator of vm memory request */ #define RTS_VMREQTARGET 0x1000 /* target of vm memory request */ -#define RTS_SYS_LOCK 0x2000 /* temporary process lock flag for systask */ #define RTS_PREEMPTED 0x4000 /* this process was preempted by a higher priority process and we should pick a new one to run. Processes with this flag should be diff --git a/kernel/system/do_runctl.c b/kernel/system/do_runctl.c index f5b243f63..a724d01b4 100644 --- a/kernel/system/do_runctl.c +++ b/kernel/system/do_runctl.c @@ -22,7 +22,7 @@ PUBLIC int do_runctl(struct proc * caller, message * m_ptr) * of RTS_PROC_STOP, and send a SIGSNDELAY signal later when the process is done * sending (ending the delay). Used by PM for safe signal delivery. */ - int proc_nr, action, flags, delayed; + int proc_nr, action, flags; register struct proc *rp; /* Extract the message parameters and do sanity checking. */ @@ -39,17 +39,13 @@ PUBLIC int do_runctl(struct proc * caller, message * m_ptr) * Note that asynchronous messages are not covered: a process using SENDA * should not also install signal handlers *and* expect POSIX compliance. */ - if (action == RC_STOP && (flags & RC_DELAY)) { - RTS_SET(rp, RTS_SYS_LOCK); + if (action == RC_STOP && (flags & RC_DELAY)) { if (RTS_ISSET(rp, RTS_SENDING) || (rp->p_misc_flags & MF_SC_DEFER)) rp->p_misc_flags |= MF_SIG_DELAY; - delayed = (rp->p_misc_flags & MF_SIG_DELAY); - - RTS_UNSET(rp, RTS_SYS_LOCK); - - if (delayed) return(EBUSY); + if (rp->p_misc_flags & MF_SIG_DELAY) + return (EBUSY); } /* Either set or clear the stop flag. */