Unpessimized CURSIG(). The fast path through CURSIG() was broken in

the 128-bit sigset_t changes by moving conditionally (rarely) executed
code to the beginning where it is always executed, and since this code
now involves 3 128-bit operations, the pessimization was relatively
large.  This change speeds up lmbench's pipe latency benchmark by
3.5%.

Fixed style bugs in CURSIG().
This commit is contained in:
Bruce Evans 2000-09-17 15:12:04 +00:00
parent fbbeeb6cd6
commit 33510ef17a

View File

@ -172,7 +172,7 @@ static int sigproptbl[NSIG] = {
* process, 0 if none. If there is a pending stop signal with default
* action, the process stops in issignal().
*
* MP SAFE
* MP SAFE.
*/
int
CURSIG(struct proc *p)
@ -180,16 +180,16 @@ CURSIG(struct proc *p)
sigset_t tmpset;
int r;
if (SIGISEMPTY(p->p_siglist))
return (0);
tmpset = p->p_siglist;
SIGSETNAND(tmpset, p->p_sigmask);
if (SIGISEMPTY(p->p_siglist) ||
(!(p->p_flag & P_TRACED) && SIGISEMPTY(tmpset))) {
return(0);
}
if (SIGISEMPTY(tmpset) && (p->p_flag & P_TRACED) == 0)
return (0);
mtx_enter(&Giant, MTX_DEF);
r = issignal(p);
mtx_exit(&Giant, MTX_DEF);
return(r);
return (r);
}
static __inline int