Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jul 2010 12:52:19 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r210235 - stable/8/sys/sys
Message-ID:  <201007191252.o6JCqJt0070779@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Jul 19 12:52:19 2010
New Revision: 210235
URL: http://svn.freebsd.org/changeset/base/210235

Log:
  MFC r209197:
  Add assert to check that the (current) thread is in critical section.
  
  MFC r209204:
  Rename CRITSECT_ASSERT to CRITICAL_ASSERT

Modified:
  stable/8/sys/sys/proc.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/sys/proc.h
==============================================================================
--- stable/8/sys/sys/proc.h	Mon Jul 19 12:41:05 2010	(r210234)
+++ stable/8/sys/sys/proc.h	Mon Jul 19 12:52:19 2010	(r210235)
@@ -326,6 +326,9 @@ do {									\
 #define	THREAD_LOCKPTR_ASSERT(td, lock)
 #endif
 
+#define	CRITICAL_ASSERT(td)						\
+    KASSERT((td)->td_critnest >= 1, ("Not in critical section"));
+
 /*
  * Flags kept in td_flags:
  * To change these you MUST have the scheduler lock.



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