summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2012-01-11 13:57:48 +0000
committerglebius <glebius@FreeBSD.org>2012-01-11 13:57:48 +0000
commit54f65f85afd65810c4ed64012e5da4ba773d2f78 (patch)
treedbdcff78338289860904224e270f1ecce6dd0db1 /sys/contrib
parent1a4786f9eb9f2de35e8e6b6c352b76df4d509814 (diff)
downloadFreeBSD-src-54f65f85afd65810c4ed64012e5da4ba773d2f78.zip
FreeBSD-src-54f65f85afd65810c4ed64012e5da4ba773d2f78.tar.gz
When running with INVARIANTS the mutex(9) code does all necessary
asserts for non-recursive mutexes.
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/pf/net/pfvar.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/contrib/pf/net/pfvar.h b/sys/contrib/pf/net/pfvar.h
index 5b47eee..fe4c0ce 100644
--- a/sys/contrib/pf/net/pfvar.h
+++ b/sys/contrib/pf/net/pfvar.h
@@ -241,15 +241,8 @@ extern struct mtx pf_task_mtx;
#define PF_LOCK_ASSERT() mtx_assert(&pf_task_mtx, MA_OWNED)
#define PF_UNLOCK_ASSERT() mtx_assert(&pf_task_mtx, MA_NOTOWNED)
-
-#define PF_LOCK() do { \
- PF_UNLOCK_ASSERT(); \
- mtx_lock(&pf_task_mtx); \
-} while(0)
-#define PF_UNLOCK() do { \
- PF_LOCK_ASSERT(); \
- mtx_unlock(&pf_task_mtx); \
-} while(0)
+#define PF_LOCK() mtx_lock(&pf_task_mtx)
+#define PF_UNLOCK() mtx_unlock(&pf_task_mtx)
#else
#define PF_LOCK_ASSERT()
#define PF_UNLOCK_ASSERT()
OpenPOWER on IntegriCloud