summaryrefslogtreecommitdiff
path: root/sys/dev/netmap
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2014-08-20 23:37:44 +0000
committerNavdeep Parhar <np@FreeBSD.org>2014-08-20 23:37:44 +0000
commit9721a22d4a4017e72cb3050faa61277f5095c15d (patch)
tree4ef4c6c65338151cdae6cd8c67a7e4b3886bb514 /sys/dev/netmap
parent8382d842d58171dfa26da4dd3d1a117b34cb5389 (diff)
Notes
Diffstat (limited to 'sys/dev/netmap')
-rw-r--r--sys/dev/netmap/netmap_kern.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h
index dc6afd85eccf..26df8edd00c0 100644
--- a/sys/dev/netmap/netmap_kern.h
+++ b/sys/dev/netmap/netmap_kern.h
@@ -44,13 +44,13 @@
#define unlikely(x) __builtin_expect((long)!!(x), 0L)
#define NM_LOCK_T struct mtx
-#define NMG_LOCK_T struct mtx
-#define NMG_LOCK_INIT() mtx_init(&netmap_global_lock, \
- "netmap global lock", NULL, MTX_DEF)
-#define NMG_LOCK_DESTROY() mtx_destroy(&netmap_global_lock)
-#define NMG_LOCK() mtx_lock(&netmap_global_lock)
-#define NMG_UNLOCK() mtx_unlock(&netmap_global_lock)
-#define NMG_LOCK_ASSERT() mtx_assert(&netmap_global_lock, MA_OWNED)
+#define NMG_LOCK_T struct sx
+#define NMG_LOCK_INIT() sx_init(&netmap_global_lock, \
+ "netmap global lock")
+#define NMG_LOCK_DESTROY() sx_destroy(&netmap_global_lock)
+#define NMG_LOCK() sx_xlock(&netmap_global_lock)
+#define NMG_UNLOCK() sx_xunlock(&netmap_global_lock)
+#define NMG_LOCK_ASSERT() sx_assert(&netmap_global_lock, SA_XLOCKED)
#define NM_SELINFO_T struct selinfo
#define MBUF_LEN(m) ((m)->m_pkthdr.len)