svn commit: r209197 - head/sys/sys
Konstantin Belousov
kib at FreeBSD.org
Tue Jun 15 09:18:27 UTC 2010
Author: kib
Date: Tue Jun 15 09:18:27 2010
New Revision: 209197
URL: http://svn.freebsd.org/changeset/base/209197
Log:
Add assert to check that the (current) thread is in critical section.
MFC after: 1 month
Modified:
head/sys/sys/proc.h
Modified: head/sys/sys/proc.h
==============================================================================
--- head/sys/sys/proc.h Tue Jun 15 09:12:31 2010 (r209196)
+++ head/sys/sys/proc.h Tue Jun 15 09:18:27 2010 (r209197)
@@ -325,6 +325,9 @@ do { \
#define THREAD_LOCKPTR_ASSERT(td, lock)
#endif
+#define CRITSECT_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.
More information about the svn-src-all
mailing list