From owner-svn-src-head@FreeBSD.ORG Sat Apr 6 08:23:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E111BF4C; Sat, 6 Apr 2013 08:23:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D3A62611; Sat, 6 Apr 2013 08:23:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r368NcZa011257; Sat, 6 Apr 2013 08:23:38 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r368Ncrc011255; Sat, 6 Apr 2013 08:23:38 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304060823.r368Ncrc011255@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 6 Apr 2013 08:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249189 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Apr 2013 08:23:39 -0000 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