summaryrefslogtreecommitdiffstats
path: root/sys/dev/em/if_em.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/em/if_em.h')
-rw-r--r--sys/dev/em/if_em.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/em/if_em.h b/sys/dev/em/if_em.h
index 167f74b..8818165 100644
--- a/sys/dev/em/if_em.h
+++ b/sys/dev/em/if_em.h
@@ -425,7 +425,11 @@ struct adapter {
struct em_hw_stats stats;
};
-#define EM_LOCK(_sc) mtx_lock(&(_sc)->mtx)
-#define EM_UNLOCK(_sc) mtx_unlock(&(_sc)->mtx)
+#define EM_LOCK_INIT(_sc, _name) \
+ mtx_init(&(_sc)->mtx, _name, MTX_NETWORK_LOCK, MTX_DEF)
+#define EM_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->mtx)
+#define EM_LOCK(_sc) mtx_lock(&(_sc)->mtx)
+#define EM_UNLOCK(_sc) mtx_unlock(&(_sc)->mtx)
+#define EM_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->mtx, MA_OWNED)
#endif /* _EM_H_DEFINED_ */
OpenPOWER on IntegriCloud