Clean up the netlock macros. Merge NET_RLOCK_IN_SOFTNET and
authorbluhm <bluhm@openbsd.org>
Sat, 6 Aug 2022 15:57:58 +0000 (15:57 +0000)
committerbluhm <bluhm@openbsd.org>
Sat, 6 Aug 2022 15:57:58 +0000 (15:57 +0000)
commit6a1c2aef88b5c0b0929f8a576cb2182a8feaaf9f
treec609a362fb181f8068fdda55212d8c9e0ebe704b
parentc9006207e2e66879fa77b58d0bb600619a6e088a
Clean up the netlock macros.  Merge NET_RLOCK_IN_SOFTNET and
NET_RLOCK_IN_IOCTL, which have the same implementation.  The R and
W are hard to see, call the new macro NET_LOCK_SHARED.  Rename the
opposite assertion from NET_ASSERT_WLOCKED to NET_ASSERT_LOCKED_EXCLUSIVE.
Update some outdated comments about net locking.
OK mpi@ mvs@
16 files changed:
sys/net/if.c
sys/net/pf_ioctl.c
sys/netinet/in.c
sys/netinet/in_pcb.c
sys/netinet/ip_input.c
sys/netinet/ip_ipsp.c
sys/netinet/ip_mroute.c
sys/netinet/raw_ip.c
sys/netinet/udp_usrreq.c
sys/netinet6/in6.c
sys/netinet6/in6_pcb.c
sys/netinet6/ip6_input.c
sys/netinet6/ip6_mroute.c
sys/netinet6/nd6.c
sys/netinet6/raw_ip6.c
sys/sys/systm.h