summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-02-25 18:45:57 +0000
committerattilio <attilio@FreeBSD.org>2008-02-25 18:45:57 +0000
commit4014b558307253555f43f360be60f49ea39b7ceb (patch)
treed455fa541ca0d9b761f28e9c67c92fd959e44b2c /sys/kern/kern_lock.c
parent49cb35343eeaa02f4e480228eb7148a3305d3b70 (diff)
downloadFreeBSD-src-4014b558307253555f43f360be60f49ea39b7ceb.zip
FreeBSD-src-4014b558307253555f43f360be60f49ea39b7ceb.tar.gz
Axe the 'thread' argument from VOP_ISLOCKED() and lockstatus() as it is
always curthread. As KPI gets broken by this patch, manpages and __FreeBSD_version will be updated by further commits. Tested by: Andrea Barberio <insomniac at slackware dot it>
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 1b14183..d80a853 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -617,15 +617,12 @@ _lockmgr_disown(struct lock *lkp, const char *file, int line)
* Determine the status of a lock.
*/
int
-lockstatus(lkp, td)
+lockstatus(lkp)
struct lock *lkp;
- struct thread *td;
{
int lock_type = 0;
int interlocked;
- KASSERT(td == curthread,
- ("%s: thread passed argument (%p) is not valid", __func__, td));
KASSERT((lkp->lk_flags & LK_DESTROYED) == 0,
("%s: %p lockmgr is destroyed", __func__, lkp));
@@ -635,7 +632,7 @@ lockstatus(lkp, td)
} else
interlocked = 0;
if (lkp->lk_exclusivecount != 0) {
- if (lkp->lk_lockholder == td)
+ if (lkp->lk_lockholder == curthread)
lock_type = LK_EXCLUSIVE;
else
lock_type = LK_EXCLOTHER;
OpenPOWER on IntegriCloud