From dfe53f1566ef6458d56c60889fe96ac9cdac692b Mon Sep 17 00:00:00 2001 From: Boris Popov Date: Wed, 21 Feb 2001 10:44:12 +0000 Subject: Add VI_LOCK(), VI_TRYLOCK() and VI_UNLOCK() macros to isolate implementation details of v_interlock. Reviewed by: jhb, phk, arch@ --- sys/sys/vnode.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index eb982f0eb78d4..b771a1aa03234 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -308,6 +308,10 @@ extern void (*lease_updatetime) __P((int deltat)); (((vp)->v_flag & VFREE) && \ ((vp)->v_holdcnt || (vp)->v_usecount)) +#define VI_LOCK(vp) mtx_lock(&(vp)->v_interlock) +#define VI_TRYLOCK(vp) mtx_trylock(&(vp)->v_interlock) +#define VI_UNLOCK(vp) mtx_unlock(&(vp)->v_interlock) + #endif /* _KERNEL */ -- cgit v1.3