summaryrefslogtreecommitdiff
path: root/sys/arch/m88k/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-12-11 21:36:07 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-12-11 21:36:07 +0000
commit85b9989f05c71d4c0bd30cf3be9eb63de6787af8 (patch)
tree9c041286638bd490342bc14ddade668d9cdf8d1f /sys/arch/m88k/include
parent0a1436a94d14a8c58066ead8f29f0e3e00741fa9 (diff)
Factorize soft interrupt code between luna88k and mvme88k.
Diffstat (limited to 'sys/arch/m88k/include')
-rw-r--r--sys/arch/m88k/include/cpu.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/sys/arch/m88k/include/cpu.h b/sys/arch/m88k/include/cpu.h
index 7e49360a207..161c7179dd5 100644
--- a/sys/arch/m88k/include/cpu.h
+++ b/sys/arch/m88k/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.10 2005/12/03 14:30:05 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.11 2005/12/11 21:36:06 miod Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* Copyright (c) 1992, 1993
@@ -177,14 +177,23 @@ struct clockframe {
#define SIR_NET 1
#define SIR_CLOCK 2
+#ifdef MULTIPROCESSOR
+extern void setsoftint(int);
+extern int clrsoftint(int);
+#else
+extern int ssir;
#define setsoftint(x) (ssir |= (x))
+#define clrsoftint(x) \
+({ \
+ int tmpsir = ssir & (x); \
+ ssir ^= tmpsir; \
+ tmpsir; \
+})
+#endif /* MULTIPROCESSOR */
+
#define setsoftnet() setsoftint(SIR_NET)
#define setsoftclock() setsoftint(SIR_CLOCK)
-#define siroff(x) (ssir &= ~(x))
-
-extern int ssir;
-
#define aston(p) ((p)->p_md.md_astpending = 1)
/*