summaryrefslogtreecommitdiff
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorAlexandr Nedvedicky <sashan@cvs.openbsd.org>2019-06-04 23:06:35 +0000
committerAlexandr Nedvedicky <sashan@cvs.openbsd.org>2019-06-04 23:06:35 +0000
commit9c98b552142b6468d768dc04167fd0b59f2aa6bb (patch)
tree0324012855ba26434a68e7ee9dc33a1758dce4d6 /sys/net/if.c
parentb85e6844484158c34229b28256507940d2579c8c (diff)
if_netisr(): trade NET_LOCK() for NET_RLOCK()
OK mpi@
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index e355f44e80d..31b107c8b4c 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.583 2019/05/12 16:38:02 sashan Exp $ */
+/* $OpenBSD: if.c,v 1.584 2019/06/04 23:06:34 sashan Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -976,14 +976,14 @@ if_netisr(void *unused)
{
int n, t = 0;
- NET_LOCK();
+ NET_RLOCK();
while ((n = netisr) != 0) {
/* Like sched_pause() but with a rwlock dance. */
if (curcpu()->ci_schedstate.spc_schedflags & SPCF_SHOULDYIELD) {
- NET_UNLOCK();
+ NET_RUNLOCK();
yield();
- NET_LOCK();
+ NET_RLOCK();
}
atomic_clearbits_int(&netisr, n);
@@ -1044,7 +1044,7 @@ if_netisr(void *unused)
}
#endif
- NET_UNLOCK();
+ NET_RUNLOCK();
}
void