Date: Wed, 6 Aug 2014 19:30:36 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269642 - head/sys/vm Message-ID: <53e2825c.57b7.623bed17@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Aug 6 19:30:35 2014 New Revision: 269642 URL: http://svnweb.freebsd.org/changeset/base/269642 Log: Add wrappers to assert that vm object is unlocked and for try upgrade. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_object.h Modified: head/sys/vm/vm_object.h ============================================================================== --- head/sys/vm/vm_object.h Wed Aug 6 19:09:21 2014 (r269641) +++ head/sys/vm/vm_object.h Wed Aug 6 19:30:35 2014 (r269642) @@ -225,6 +225,8 @@ extern struct vm_object kmem_object_stor rw_assert(&(object)->lock, RA_RLOCKED) #define VM_OBJECT_ASSERT_WLOCKED(object) \ rw_assert(&(object)->lock, RA_WLOCKED) +#define VM_OBJECT_ASSERT_UNLOCKED(object) \ + rw_assert(&(object)->lock, RA_UNLOCKED) #define VM_OBJECT_LOCK_DOWNGRADE(object) \ rw_downgrade(&(object)->lock) #define VM_OBJECT_RLOCK(object) \ @@ -237,6 +239,8 @@ extern struct vm_object kmem_object_stor rw_try_rlock(&(object)->lock) #define VM_OBJECT_TRYWLOCK(object) \ rw_try_wlock(&(object)->lock) +#define VM_OBJECT_TRYUPGRADE(object) \ + rw_try_upgrade(&(object)->lock) #define VM_OBJECT_WLOCK(object) \ rw_wlock(&(object)->lock) #define VM_OBJECT_WUNLOCK(object) \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e2825c.57b7.623bed17>