summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_node.h
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-10-17 21:41:52 +0000
committersam <sam@FreeBSD.org>2003-10-17 21:41:52 +0000
commit365e4629edf786bcc796bf7f5ca4bd137bd5056f (patch)
tree8aa23f5524cace34ff5c78a678f7cd8e58c7f011 /sys/net80211/ieee80211_node.h
parent1869c3be82cfa3adc867643c5d5d4620a4d3a9d6 (diff)
downloadFreeBSD-src-365e4629edf786bcc796bf7f5ca4bd137bd5056f.zip
FreeBSD-src-365e4629edf786bcc796bf7f5ca4bd137bd5056f.tar.gz
parameterize locking to improve portability and possible
change to different locking strategies
Diffstat (limited to 'sys/net80211/ieee80211_node.h')
-rw-r--r--sys/net80211/ieee80211_node.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h
index d61ff7b..b0e0437 100644
--- a/sys/net80211/ieee80211_node.h
+++ b/sys/net80211/ieee80211_node.h
@@ -118,6 +118,14 @@ ieee80211_unref_node(struct ieee80211_node **ni)
*ni = NULL; /* guard against use */
}
+#define IEEE80211_NODE_LOCK_INIT(_ic, _name) \
+ mtx_init(&(_ic)->ic_nodelock, _name, "802.11 node table", MTX_DEF)
+#define IEEE80211_NODE_LOCK_DESTROY(_ic) mtx_destroy(&(_ic)->ic_nodelock)
+#define IEEE80211_NODE_LOCK(_ic) mtx_lock(&(_ic)->ic_nodelock)
+#define IEEE80211_NODE_UNLOCK(_ic) mtx_unlock(&(_ic)->ic_nodelock)
+#define IEEE80211_NODE_LOCK_ASSERT(_ic) \
+ mtx_assert(&(_ic)->ic_nodelock, MA_OWNED)
+
struct ieee80211com;
extern void ieee80211_node_attach(struct ifnet *);
OpenPOWER on IntegriCloud