diff options
author | eivind <eivind@FreeBSD.org> | 1999-12-11 16:13:02 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1999-12-11 16:13:02 +0000 |
commit | 287836faea1ff2f002f4c9ea357e87cb7f2b4cd6 (patch) | |
tree | 9524fb381c1cbe8aed4ee0af7b1a693057985617 /sys/kern/vfs_default.c | |
parent | ff090abf5121f6bf2199248b70a4896d25f49550 (diff) | |
download | FreeBSD-src-287836faea1ff2f002f4c9ea357e87cb7f2b4cd6.zip FreeBSD-src-287836faea1ff2f002f4c9ea357e87cb7f2b4cd6.tar.gz |
Lock reporting and assertion changes.
* lockstatus() and VOP_ISLOCKED() gets a new process argument and a new
return value: LK_EXCLOTHER, when the lock is held exclusively by another
process.
* The ASSERT_VOP_(UN)LOCKED family is extended to use what this gives them
* Extend the vnode_if.src format to allow more exact specification than
locked/unlocked.
This commit should not do any semantic changes unless you are using
DEBUG_VFS_LOCKS.
Discussed with: grog, mch, peter, phk
Reviewed by: peter
Diffstat (limited to 'sys/kern/vfs_default.c')
-rw-r--r-- | sys/kern/vfs_default.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index fe5d94d..600df41 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -255,6 +255,7 @@ int vop_stdislocked(ap) struct vop_islocked_args /* { struct vnode *a_vp; + struct proc *a_p; } */ *ap; { struct lock *l; @@ -262,7 +263,7 @@ vop_stdislocked(ap) if ((l = (struct lock *)ap->a_vp->v_data) == NULL) return 0; - return (lockstatus(l)); + return (lockstatus(l, ap->a_p)); } /* @@ -484,13 +485,14 @@ int vop_noislocked(ap) struct vop_islocked_args /* { struct vnode *a_vp; + struct proc *a_p; } */ *ap; { struct vnode *vp = ap->a_vp; if (vp->v_vnlock == NULL) return (0); - return (lockstatus(vp->v_vnlock)); + return (lockstatus(vp->v_vnlock, ap->a_p)); } /* |