From 7213f4c32b94b60add6400f4213c1ca347bd609f Mon Sep 17 00:00:00 2001 From: attilio Date: Thu, 24 Jan 2008 12:34:30 +0000 Subject: Cleanup lockmgr interface and exported KPI: - Remove the "thread" argument from the lockmgr() function as it is always curthread now - Axe lockcount() function as it is no longer used - Axe LOCKMGR_ASSERT() as it is bogus really and no currently used. Hopefully this will be soonly replaced by something suitable for it. - Remove the prototype for dumplockinfo() as the function is no longer present Addictionally: - Introduce a KASSERT() in lockstatus() in order to let it accept only curthread or NULL as they should only be passed - Do a little bit of style(9) cleanup on lockmgr.h KPI results heavilly broken by this change, so manpages and FreeBSD_version will be modified accordingly by further commits. Tested by: matteo --- sys/kern/vfs_default.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/kern/vfs_default.c') diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 26d5640..4648f3a 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -263,8 +263,8 @@ vop_stdlock(ap) { struct vnode *vp = ap->a_vp; - return (_lockmgr(vp->v_vnlock, ap->a_flags, VI_MTX(vp), curthread, - ap->a_file, ap->a_line)); + return (_lockmgr(vp->v_vnlock, ap->a_flags, VI_MTX(vp), ap->a_file, + ap->a_line)); } /* See above. */ @@ -278,8 +278,7 @@ vop_stdunlock(ap) { struct vnode *vp = ap->a_vp; - return (lockmgr(vp->v_vnlock, ap->a_flags | LK_RELEASE, VI_MTX(vp), - curthread)); + return (lockmgr(vp->v_vnlock, ap->a_flags | LK_RELEASE, VI_MTX(vp))); } /* See above. */ -- cgit v1.1