Modify VOP_ISLOCKED() and lockstatus() prototypes in order to reflect

'thread' argument axing.
This commit is contained in:
Attilio Rao 2008-02-25 19:12:01 +00:00
parent fe5628d3c1
commit 3220cdf4a3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176562
2 changed files with 8 additions and 22 deletions

View file

@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd January 19, 2008
.Dd February 25, 2008
.Os
.Dt VOP_LOCK 9
.Sh NAME
@ -46,7 +46,7 @@
.Ft int
.Fn VOP_UNLOCK "struct vnode *vp" "int flags"
.Ft int
.Fn VOP_ISLOCKED "struct vnode *vp" "struct thread *td"
.Fn VOP_ISLOCKED "struct vnode *vp"
.Ft int
.Fn vn_lock "struct vnode *vp" "int flags"
.Sh DESCRIPTION
@ -101,9 +101,6 @@ will unlock the simple lock after getting the lock).
.It Dv LK_RETRY
Retry until locked.
.El
.It Fa td
Thread context to use for the locks.
.El
.Pp
Kernel code should use
.Fn vn_lock

View file

@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd February 13, 2008
.Dd February 25, 2008
.Dt LOCK 9
.Os
.Sh NAME
@ -49,7 +49,7 @@
.Ft int
.Fn lockmgr "struct lock *lkp" "u_int flags" "struct mtx *interlkp"
.Ft int
.Fn lockstatus "struct lock *lkp" "struct thread *td"
.Fn lockstatus "struct lock *lkp"
.Ft void
.Fn lockmgr_disown "struct lock *lkp"
.Ft void
@ -180,20 +180,11 @@ See
.Pp
The
.Fn lockstatus
function returns the status of the lock in relation to the
.Vt thread
passed to it.
Note that if
.Fa td
is
.Dv NULL
and an exclusive lock is held,
.Dv LK_EXCLUSIVE
will be returned.
function returns the status of the lock in relation to the current thread.
.Pp
The
.Fn lockmgr_disown
function switches the owner from curthread to be
function switches the owner from the current thread to be
.Dv LK_KERNPROC,
if the lock is already held.
.Pp
@ -283,11 +274,9 @@ The
function returns:
.Bl -tag -width ".Dv LK_EXCLUSIVE"
.It Dv LK_EXCLUSIVE
An exclusive lock is held by the thread
.Fa td .
An exclusive lock is held by the current thread.
.It Dv LK_EXCLOTHER
An exclusive lock is held by someone other than the thread
.Fa td .
An exclusive lock is held by someone other than the current thread.
.It Dv LK_SHARED
A shared lock is held.
.It Li 0