diff options
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 58ab679..c41390a 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1419,6 +1419,40 @@ if_rtdel(struct radix_node *rn, void *arg) } /* + * Wrapper functions for struct ifnet address list locking macros. These are + * used by kernel modules to avoid encoding programming interface or binary + * interface assumptions that may be violated when kernel-internal locking + * approaches change. + */ +void +if_addr_rlock(struct ifnet *ifp) +{ + + IF_ADDR_LOCK(ifp); +} + +void +if_addr_runlock(struct ifnet *ifp) +{ + + IF_ADDR_UNLOCK(ifp); +} + +void +if_maddr_rlock(struct ifnet *ifp) +{ + + IF_ADDR_LOCK(ifp); +} + +void +if_maddr_runlock(struct ifnet *ifp) +{ + + IF_ADDR_UNLOCK(ifp); +} + +/* * Reference count functions for ifaddrs. */ void |