summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-05-29 18:10:44 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-05-29 18:10:44 +0000
commit2daba14db3ad27d7c4b423645a257e6ef8a252dd (patch)
treeaf0a29b6ad292100004cc51768fa2dcbbe4d122f /sys/arch/alpha
parent77cec5547fcb2bb4116363eafb5c8e596af921e9 (diff)
Use atomic operations to operate on netisr, instead of clearing it at splhigh.
This changes nothing on legacy architectures, but is a bit faster (and simpler) on the interesting ones.
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r--sys/arch/alpha/alpha/interrupt.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/arch/alpha/alpha/interrupt.c b/sys/arch/alpha/alpha/interrupt.c
index 79638e6f096..01901d76a27 100644
--- a/sys/arch/alpha/alpha/interrupt.c
+++ b/sys/arch/alpha/alpha/interrupt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interrupt.c,v 1.22 2007/05/05 20:46:34 miod Exp $ */
+/* $OpenBSD: interrupt.c,v 1.23 2007/05/29 18:10:41 miod Exp $ */
/* $NetBSD: interrupt.c,v 1.46 2000/06/03 20:47:36 thorpej Exp $ */
/*-
@@ -492,22 +492,21 @@ int netisr;
void
netintr()
{
- int n, s;
+ int n;
- s = splhigh();
- n = netisr;
- netisr = 0;
- splx(s);
+ while ((n = netisr) != 0) {
+ atomic_clearbits_int(&netisr, n);
#define DONETISR(bit, fn) \
- do { \
- if (n & (1 << (bit))) \
- fn(); \
- } while (0)
+ do { \
+ if (n & (1 << (bit))) \
+ fn(); \
+ } while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
+ }
}
struct alpha_soft_intr alpha_soft_intrs[SI_NSOFT];