Date: Sat, 6 Apr 2013 08:23:38 +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: r249189 - head/sys/sys Message-ID: <201304060823.r368Ncrc011255@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304060823.r368Ncrc011255>