summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2002-04-04 17:49:48 +0000
committerbde <bde@FreeBSD.org>2002-04-04 17:49:48 +0000
commit14ae95f735978b62fd4a040a2f05a7d5c5a30712 (patch)
tree27b9df7330c17460156c8810b34fef449a2d1764 /sys/i386
parent2a571683e0a57e785364a0bccbf360ed24409bd1 (diff)
downloadFreeBSD-src-14ae95f735978b62fd4a040a2f05a7d5c5a30712.zip
FreeBSD-src-14ae95f735978b62fd4a040a2f05a7d5c5a30712.tar.gz
Moved signal handling and rescheduling from userret() to ast() so that
they aren't in the usual path of execution for syscalls and traps. The main complication for this is that we have to set flags to control ast() everywhere that changes the signal mask. Avoid locking in userret() in most of the remaining cases. Submitted by: luoqi (first part only, long ago, reorganized by me) Reminded by: dillon
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/machdep.c2
-rw-r--r--sys/i386/ibcs2/ibcs2_signal.c3
-rw-r--r--sys/i386/linux/linux_sysvec.c2
-rw-r--r--sys/i386/svr4/svr4_machdep.c1
4 files changed, 8 insertions, 0 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index ffb2094..c8b7c5e 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -649,6 +649,7 @@ osigreturn(td, uap)
SIGSETOLD(p->p_sigmask, scp->sc_mask);
SIG_CANTMASK(p->p_sigmask);
+ signotify(p);
PROC_UNLOCK(p);
regs->tf_ebp = scp->sc_fp;
regs->tf_esp = scp->sc_sp;
@@ -758,6 +759,7 @@ sigreturn(td, uap)
p->p_sigmask = ucp->uc_sigmask;
SIG_CANTMASK(p->p_sigmask);
+ signotify(p);
PROC_UNLOCK(p);
return (EJUSTRETURN);
}
diff --git a/sys/i386/ibcs2/ibcs2_signal.c b/sys/i386/ibcs2/ibcs2_signal.c
index fd32aaf..12bd038 100644
--- a/sys/i386/ibcs2/ibcs2_signal.c
+++ b/sys/i386/ibcs2/ibcs2_signal.c
@@ -328,6 +328,7 @@ ibcs2_sigsys(td, uap)
/* return SIG_HOLD and unblock signal*/
td->td_retval[0] = (int)IBCS2_SIG_HOLD;
SIGDELSET(p->p_sigmask, signum);
+ signotify(p);
}
PROC_UNLOCK(p);
}
@@ -426,11 +427,13 @@ ibcs2_sigprocmask(td, uap)
case IBCS2_SIG_UNBLOCK:
SIGSETNAND(p->p_sigmask, bss);
+ signotify(p);
break;
case IBCS2_SIG_SETMASK:
p->p_sigmask = bss;
SIG_CANTMASK(p->p_sigmask);
+ signotify(p);
break;
default:
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index e1321ef..c8bc6c8 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -555,6 +555,7 @@ linux_sigreturn(td, args)
PROC_LOCK(p);
linux_to_bsd_sigset(&lmask, &p->p_sigmask);
SIG_CANTMASK(p->p_sigmask);
+ signotify(p);
PROC_UNLOCK(p);
/*
@@ -654,6 +655,7 @@ linux_rt_sigreturn(td, args)
PROC_LOCK(p);
linux_to_bsd_sigset(&uc.uc_sigmask, &p->p_sigmask);
SIG_CANTMASK(p->p_sigmask);
+ signotify(p);
PROC_UNLOCK(p);
/*
diff --git a/sys/i386/svr4/svr4_machdep.c b/sys/i386/svr4/svr4_machdep.c
index c82718d..c015888 100644
--- a/sys/i386/svr4/svr4_machdep.c
+++ b/sys/i386/svr4/svr4_machdep.c
@@ -294,6 +294,7 @@ svr4_setcontext(td, uc)
svr4_to_bsd_sigset(&uc->uc_sigmask, &mask);
SIG_CANTMASK(mask);
p->p_sigmask = mask;
+ signotify(p);
}
PROC_UNLOCK(p);
OpenPOWER on IntegriCloud