svn commit: r249189 - head/sys/sys

Gleb Smirnoff glebius at FreeBSD.org
Sat Apr 6 08:23:39 UTC 2013


Author: glebius
Date: Sat Apr  6 08:23:38 2013
New Revision: 249189
URL: http://svnweb.freebsd.org/changeset/base/249189

Log:
  Move CRITICAL_ASSERT() macro to systm.h, where the critical(9)
  functions are declared.

Modified:
  head/sys/sys/proc.h
  head/sys/sys/systm.h

Modified: head/sys/sys/proc.h
==============================================================================
--- head/sys/sys/proc.h	Sat Apr  6 08:21:37 2013	(r249188)
+++ head/sys/sys/proc.h	Sat Apr  6 08:23:38 2013	(r249189)
@@ -341,9 +341,6 @@ 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.

Modified: head/sys/sys/systm.h
==============================================================================
--- head/sys/sys/systm.h	Sat Apr  6 08:21:37 2013	(r249188)
+++ head/sys/sys/systm.h	Sat Apr  6 08:23:38 2013	(r249189)
@@ -112,6 +112,12 @@ void	kassert_panic(const char *fmt, ...)
 	    ((uintptr_t)&(var) & (sizeof(void *) - 1)) == 0, msg)
 
 /*
+ * Assert that a thread is in critical(9) section.
+ */
+#define	CRITICAL_ASSERT(td)						\
+	KASSERT((td)->td_critnest >= 1, ("Not in critical section"));
+ 
+/*
  * If we have already panic'd and this is the thread that called
  * panic(), then don't block on any mutexes but silently succeed.
  * Otherwise, the kernel will deadlock since the scheduler isn't


More information about the svn-src-all mailing list