Date: Fri, 31 May 2013 16:00:42 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251183 - head/sys/vm Message-ID: <201305311600.r4VG0gkY058024@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Fri May 31 16:00:42 2013 New Revision: 251183 URL: http://svnweb.freebsd.org/changeset/base/251183 Log: Simplify the definition of vm_page_lock_assert(). There is no compelling reason to inline the implementation of vm_page_lock_assert() in the !KLD_MODULES case. Use the same implementation for both KLD_MODULES and !KLD_MODULES. Reviewed by: kib Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Fri May 31 15:19:00 2013 (r251182) +++ head/sys/vm/vm_page.h Fri May 31 16:00:42 2013 (r251183) @@ -222,18 +222,17 @@ extern struct mtx_padalign pa_lock[]; #define vm_page_lock(m) vm_page_lock_KBI((m), LOCK_FILE, LOCK_LINE) #define vm_page_unlock(m) vm_page_unlock_KBI((m), LOCK_FILE, LOCK_LINE) #define vm_page_trylock(m) vm_page_trylock_KBI((m), LOCK_FILE, LOCK_LINE) -#if defined(INVARIANTS) -#define vm_page_lock_assert(m, a) \ - vm_page_lock_assert_KBI((m), (a), __FILE__, __LINE__) -#else -#define vm_page_lock_assert(m, a) -#endif #else /* !KLD_MODULE */ #define vm_page_lockptr(m) (PA_LOCKPTR(VM_PAGE_TO_PHYS((m)))) #define vm_page_lock(m) mtx_lock(vm_page_lockptr((m))) #define vm_page_unlock(m) mtx_unlock(vm_page_lockptr((m))) #define vm_page_trylock(m) mtx_trylock(vm_page_lockptr((m))) -#define vm_page_lock_assert(m, a) mtx_assert(vm_page_lockptr((m)), (a)) +#endif +#if defined(INVARIANTS) +#define vm_page_lock_assert(m, a) \ + vm_page_lock_assert_KBI((m), (a), __FILE__, __LINE__) +#else +#define vm_page_lock_assert(m, a) #endif /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305311600.r4VG0gkY058024>