summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-07-27 12:08:20 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-07-27 12:08:20 +0000
commite400130b3a704f3c427dc210eb92bf6e4e96773b (patch)
tree9a1b029acef2a7efb56a272bf9eaf5eaba7d26d2
parent3b7b87ab436a7a227ab24ec681d96db16ec4157f (diff)
Stop doing an splsoftnet()/splx() dance inside the NET_LOCK().
This will allow us to not carry a returned value when entering a critical section. ok bluhm@, visa@
-rw-r--r--sys/sys/systm.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 5b9dfddceee..f83c12ffcdd 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: systm.h,v 1.131 2017/05/29 12:12:35 tedu Exp $ */
+/* $OpenBSD: systm.h,v 1.132 2017/07/27 12:08:19 mpi Exp $ */
/* $NetBSD: systm.h,v 1.50 1996/06/09 04:55:09 briggs Exp $ */
/*-
@@ -299,12 +299,12 @@ extern struct rwlock netlock;
#define NET_LOCK(s) \
do { \
rw_enter_write(&netlock); \
- s = splsoftnet(); \
+ s = IPL_SOFTNET; \
} while (0)
#define NET_UNLOCK(s) \
do { \
- splx(s); \
+ (void)s; \
rw_exit_write(&netlock); \
} while (0)
@@ -312,7 +312,6 @@ do { \
do { \
if (rw_status(&netlock) != RW_WRITE) \
splassert_fail(RW_WRITE, rw_status(&netlock), __func__);\
- splsoftassert(IPL_SOFTNET); \
} while (0)
#define NET_ASSERT_UNLOCKED() \