summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/compat/freebsd/freebsd_signal.c7
-rw-r--r--sys/compat/hpux/hpux_sig.c17
-rw-r--r--sys/compat/ibcs2/ibcs2_signal.c7
-rw-r--r--sys/compat/linux/linux_signal.c17
-rw-r--r--sys/compat/osf1/osf1_signal.c7
-rw-r--r--sys/compat/svr4/svr4_signal.c7
6 files changed, 36 insertions, 26 deletions
diff --git a/sys/compat/freebsd/freebsd_signal.c b/sys/compat/freebsd/freebsd_signal.c
index 0b723d2fa00..41b68581e1b 100644
--- a/sys/compat/freebsd/freebsd_signal.c
+++ b/sys/compat/freebsd/freebsd_signal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: freebsd_signal.c,v 1.3 2003/06/02 23:28:00 millert Exp $ */
+/* $OpenBSD: freebsd_signal.c,v 1.4 2008/05/01 11:53:25 miod Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -170,6 +170,7 @@ freebsd_sys_sigprocmask40(p, v, retval)
freebsd_sigset_t nss, oss;
sigset_t obnss;
int error = 0;
+ int s;
if (SCARG(uap, set)) {
error = copyin(SCARG(uap, set), &nss, sizeof(nss));
@@ -186,7 +187,7 @@ freebsd_sys_sigprocmask40(p, v, retval)
}
if (SCARG(uap, set)) {
bcopy(&nss.__bits[0], &obnss, sizeof(sigset_t));
- (void)splhigh();
+ s = splhigh();
switch (SCARG(uap, how)) {
case SIG_BLOCK:
p->p_sigmask |= obnss &~ sigcantmask;
@@ -201,7 +202,7 @@ freebsd_sys_sigprocmask40(p, v, retval)
error = EINVAL;
break;
}
- (void) spl0();
+ splx(s);
}
return (error);
}
diff --git a/sys/compat/hpux/hpux_sig.c b/sys/compat/hpux/hpux_sig.c
index 16182fc1f58..f644e483319 100644
--- a/sys/compat/hpux/hpux_sig.c
+++ b/sys/compat/hpux/hpux_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_sig.c,v 1.10 2007/10/20 16:41:43 miod Exp $ */
+/* $OpenBSD: hpux_sig.c,v 1.11 2008/05/01 11:53:26 miod Exp $ */
/* $NetBSD: hpux_sig.c,v 1.16 1997/04/01 19:59:02 scottr Exp $ */
/*
@@ -139,11 +139,12 @@ hpux_sys_sigblock(p, v, retval)
register_t *retval;
{
struct hpux_sys_sigblock_args *uap = v;
+ int s;
- (void) splhigh();
+ s = splhigh();
*retval = bsdtohpuxmask(p->p_sigmask);
p->p_sigmask |= hpuxtobsdmask(SCARG(uap, mask)) &~ sigcantmask;
- (void) spl0();
+ splx(s);
return (0);
}
@@ -154,11 +155,12 @@ hpux_sys_sigsetmask(p, v, retval)
register_t *retval;
{
struct hpux_sys_sigsetmask_args *uap = v;
+ int s;
- (void) splhigh();
+ s = splhigh();
*retval = bsdtohpuxmask(p->p_sigmask);
p->p_sigmask = hpuxtobsdmask(SCARG(uap, mask)) &~ sigcantmask;
- (void) spl0();
+ splx(s);
return (0);
}
@@ -212,6 +214,7 @@ hpux_sys_sigprocmask(p, v, retval)
struct hpux_sys_sigprocmask_args *uap = v;
int mask, error = 0;
hpux_sigset_t sigset;
+ int s;
/*
* Copy out old mask first to ensure no errors.
@@ -229,7 +232,7 @@ hpux_sys_sigprocmask(p, v, retval)
sizeof(sigset)))
return (EFAULT);
mask = hpuxtobsdmask(sigset.sigset[0]);
- (void) splhigh();
+ s = splhigh();
switch (SCARG(uap, how)) {
case HPUXSIG_BLOCK:
p->p_sigmask |= mask &~ sigcantmask;
@@ -244,7 +247,7 @@ hpux_sys_sigprocmask(p, v, retval)
error = EINVAL;
break;
}
- (void) spl0();
+ splx(s);
}
return (error);
}
diff --git a/sys/compat/ibcs2/ibcs2_signal.c b/sys/compat/ibcs2/ibcs2_signal.c
index 4af83bb86d6..d7a4b081880 100644
--- a/sys/compat/ibcs2/ibcs2_signal.c
+++ b/sys/compat/ibcs2/ibcs2_signal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ibcs2_signal.c,v 1.7 2002/03/14 01:26:50 millert Exp $ */
+/* $OpenBSD: ibcs2_signal.c,v 1.8 2008/05/01 11:53:26 miod Exp $ */
/* $NetBSD: ibcs2_signal.c,v 1.8 1996/05/03 17:05:27 christos Exp $ */
/*
@@ -390,6 +390,7 @@ ibcs2_sys_sigprocmask(p, v, retval)
ibcs2_sigset_t iss;
sigset_t bss;
int error = 0;
+ int s;
if (SCARG(uap, oset) != NULL) {
/* Fix the return value first if needed */
@@ -407,7 +408,7 @@ ibcs2_sys_sigprocmask(p, v, retval)
ibcs2_to_bsd_sigset(&iss, &bss);
- (void) splhigh();
+ s = splhigh();
switch (SCARG(uap, how)) {
case IBCS2_SIG_BLOCK:
@@ -427,7 +428,7 @@ ibcs2_sys_sigprocmask(p, v, retval)
break;
}
- (void) spl0();
+ splx(s);
return error;
}
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c
index 96917b0d0c1..145ae4ca70f 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_signal.c,v 1.12 2003/02/25 09:10:27 tedu Exp $ */
+/* $OpenBSD: linux_signal.c,v 1.13 2008/05/01 11:53:26 miod Exp $ */
/* $NetBSD: linux_signal.c,v 1.10 1996/04/04 23:51:36 christos Exp $ */
/*
@@ -583,6 +583,7 @@ linux_sys_sigprocmask(p, v, retval)
linux_old_sigset_t ss;
sigset_t bs;
int error = 0;
+ int s;
*retval = 0;
@@ -602,7 +603,7 @@ linux_sys_sigprocmask(p, v, retval)
linux_old_to_bsd_sigset(&ss, &bs);
- (void) splhigh();
+ s = splhigh();
switch (SCARG(uap, how)) {
case LINUX_SIG_BLOCK:
@@ -622,7 +623,7 @@ linux_sys_sigprocmask(p, v, retval)
break;
}
- (void) spl0();
+ splx(s);
return (error);
}
@@ -642,6 +643,7 @@ linux_sys_rt_sigprocmask(p, v, retval)
linux_sigset_t ls;
sigset_t bs;
int error = 0;
+ int s;
if (SCARG(uap, sigsetsize) != sizeof(linux_sigset_t))
return (EINVAL);
@@ -664,7 +666,7 @@ linux_sys_rt_sigprocmask(p, v, retval)
linux_to_bsd_sigset(&ls, &bs);
- (void) splhigh();
+ s = splhigh();
switch (SCARG(uap, how)) {
case LINUX_SIG_BLOCK:
@@ -684,7 +686,7 @@ linux_sys_rt_sigprocmask(p, v, retval)
break;
}
- (void) spl0();
+ splx(s);
return (error);
}
@@ -724,15 +726,16 @@ linux_sys_sigsetmask(p, v, retval)
} */ *uap = v;
linux_old_sigset_t mask;
sigset_t bsdsig;
+ int s;
bsd_to_linux_old_sigset(&p->p_sigmask, (linux_old_sigset_t *)retval);
mask = SCARG(uap, mask);
bsd_to_linux_old_sigset(&bsdsig, &mask);
- splhigh();
+ s = splhigh();
p->p_sigmask = bsdsig & ~sigcantmask;
- spl0();
+ splx(s);
return (0);
}
diff --git a/sys/compat/osf1/osf1_signal.c b/sys/compat/osf1/osf1_signal.c
index 40165280f70..336586ef7ef 100644
--- a/sys/compat/osf1/osf1_signal.c
+++ b/sys/compat/osf1/osf1_signal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: osf1_signal.c,v 1.9 2000/08/04 15:47:55 ericj Exp $ */
+/* $OpenBSD: osf1_signal.c,v 1.10 2008/05/01 11:53:26 miod Exp $ */
/* $NetBSD: osf1_signal.c,v 1.15 1999/05/05 00:57:43 cgd Exp $ */
/*
@@ -315,6 +315,7 @@ osf1_sys_sigprocmask(p, v, retval)
osf1_sigset_t oss;
sigset_t bss;
int error = 0;
+ int s;
if (SCARG(uap, oset) != NULL) {
/* Fix the return value first if needed */
@@ -332,7 +333,7 @@ osf1_sys_sigprocmask(p, v, retval)
osf1_cvt_sigset_to_native(&oss, &bss);
- (void) splhigh();
+ s = splhigh();
switch (SCARG(uap, how)) {
case OSF1_SIG_BLOCK:
@@ -352,7 +353,7 @@ osf1_sys_sigprocmask(p, v, retval)
break;
}
- (void) spl0();
+ splx(s);
return error;
}
diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c
index c123e0243c8..6131f97260a 100644
--- a/sys/compat/svr4/svr4_signal.c
+++ b/sys/compat/svr4/svr4_signal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_signal.c,v 1.10 2002/03/14 01:26:51 millert Exp $ */
+/* $OpenBSD: svr4_signal.c,v 1.11 2008/05/01 11:53:26 miod Exp $ */
/* $NetBSD: svr4_signal.c,v 1.24 1996/12/06 03:21:53 christos Exp $ */
/*
@@ -514,6 +514,7 @@ svr4_sys_sigprocmask(p, v, retval)
svr4_sigset_t sss;
sigset_t bss;
int error = 0;
+ int s;
if (SCARG(uap, oset) != NULL) {
/* Fix the return value first if needed */
@@ -531,7 +532,7 @@ svr4_sys_sigprocmask(p, v, retval)
svr4_to_bsd_sigset(&sss, &bss);
- (void) splhigh();
+ s = splhigh();
switch (SCARG(uap, how)) {
case SVR4_SIG_BLOCK:
@@ -551,7 +552,7 @@ svr4_sys_sigprocmask(p, v, retval)
break;
}
- (void) spl0();
+ splx(s);
return error;
}