Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jan 2012 13:57:48 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r229959 - head/sys/contrib/pf/net
Message-ID:  <201201111357.q0BDvm36062199@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Jan 11 13:57:48 2012
New Revision: 229959
URL: http://svn.freebsd.org/changeset/base/229959

Log:
  When running with INVARIANTS the mutex(9) code does all necessary
  asserts for non-recursive mutexes.

Modified:
  head/sys/contrib/pf/net/pfvar.h

Modified: head/sys/contrib/pf/net/pfvar.h
==============================================================================
--- head/sys/contrib/pf/net/pfvar.h	Wed Jan 11 13:56:31 2012	(r229958)
+++ head/sys/contrib/pf/net/pfvar.h	Wed Jan 11 13:57:48 2012	(r229959)
@@ -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()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201111357.q0BDvm36062199>