summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/ipl_funcs.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-05-09 23:40:29 +0000
committerpeter <peter@FreeBSD.org>1999-05-09 23:40:29 +0000
commita3b1d73c6f50dfff9212f8e3d8ae96f8b9bb784e (patch)
tree54c1cff3b001e23801c3089b09ccc5d713d91fda /sys/i386/isa/ipl_funcs.c
parent04952717333032203fa0a5ff4ca65c8860d7e73f (diff)
downloadFreeBSD-src-a3b1d73c6f50dfff9212f8e3d8ae96f8b9bb784e.zip
FreeBSD-src-a3b1d73c6f50dfff9212f8e3d8ae96f8b9bb784e.tar.gz
Un-duplicate DO_SETBITS() (it was identical for both SMP and !SMP)..
Diffstat (limited to 'sys/i386/isa/ipl_funcs.c')
-rw-r--r--sys/i386/isa/ipl_funcs.c46
1 files changed, 16 insertions, 30 deletions
diff --git a/sys/i386/isa/ipl_funcs.c b/sys/i386/isa/ipl_funcs.c
index 98a5412..359ef51 100644
--- a/sys/i386/isa/ipl_funcs.c
+++ b/sys/i386/isa/ipl_funcs.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ipl_funcs.c,v 1.18 1999/05/06 22:13:53 peter Exp $
+ * $Id: ipl_funcs.c,v 1.19 1999/05/09 23:29:56 peter Exp $
*/
#include <sys/types.h>
@@ -32,11 +32,11 @@
#include <machine/globals.h>
#include <i386/isa/intr_machdep.h>
-#ifndef SMP
/*
* The volatile bitmap variables must be set atomically. This normally
* involves using a machine-dependent bit-set or `or' instruction.
*/
+#ifndef SMP
#define DO_SETBITS(name, var, bits) \
void name(void) \
@@ -44,6 +44,18 @@ void name(void) \
setbits(var, bits); \
}
+#else /* !SMP */
+
+#define DO_SETBITS(name, var, bits) \
+void name(void) \
+{ \
+ IFCPL_LOCK(); \
+ setbits(var, bits); \
+ IFCPL_UNLOCK(); \
+}
+
+#endif /* !SMP */
+
DO_SETBITS(setdelayed, &ipending, loadandclear(&idelayed))
DO_SETBITS(setsoftast, &ipending, SWI_AST_PENDING)
DO_SETBITS(setsoftcamnet,&ipending, SWI_CAMNET_PENDING)
@@ -59,6 +71,8 @@ DO_SETBITS(schedsoftnet, &idelayed, SWI_NET_PENDING)
DO_SETBITS(schedsofttty, &idelayed, SWI_TTY_PENDING)
DO_SETBITS(schedsoftvm, &idelayed, SWI_VM_PENDING)
+#ifndef SMP
+
unsigned
softclockpending(void)
{
@@ -130,34 +144,6 @@ splq(intrmask_t mask)
#endif /* SPL_DEBUG_POSTCODE */
-/*
- * The volatile bitmap variables must be set atomically. This normally
- * involves using a machine-dependent bit-set or `or' instruction.
- */
-
-#define DO_SETBITS(name, var, bits) \
-void name(void) \
-{ \
- IFCPL_LOCK(); \
- setbits(var, bits); \
- IFCPL_UNLOCK(); \
-}
-
-DO_SETBITS(setdelayed, &ipending, loadandclear(&idelayed))
-DO_SETBITS(setsoftast, &ipending, SWI_AST_PENDING)
-DO_SETBITS(setsoftcamnet,&ipending, SWI_CAMNET_PENDING)
-DO_SETBITS(setsoftcambio,&ipending, SWI_CAMBIO_PENDING)
-DO_SETBITS(setsoftclock, &ipending, SWI_CLOCK_PENDING)
-DO_SETBITS(setsoftnet, &ipending, SWI_NET_PENDING)
-DO_SETBITS(setsofttty, &ipending, SWI_TTY_PENDING)
-DO_SETBITS(setsoftvm, &ipending, SWI_VM_PENDING)
-
-DO_SETBITS(schedsoftcamnet, &idelayed, SWI_CAMNET_PENDING)
-DO_SETBITS(schedsoftcambio, &idelayed, SWI_CAMBIO_PENDING)
-DO_SETBITS(schedsoftnet, &idelayed, SWI_NET_PENDING)
-DO_SETBITS(schedsofttty, &idelayed, SWI_TTY_PENDING)
-DO_SETBITS(schedsoftvm, &idelayed, SWI_VM_PENDING)
-
unsigned
softclockpending(void)
{
OpenPOWER on IntegriCloud