summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-02-08 21:45:47 +0000
committerattilio <attilio@FreeBSD.org>2008-02-08 21:45:47 +0000
commite1db4e70b3e0f4dcd6006b5380fd6484833c54e5 (patch)
treed665c82ab8f9928d1e59b948e716949fff3645b5 /sys/kern/kern_lock.c
parenta50bf6017b13b7c71ee735e11686a919ae329a41 (diff)
downloadFreeBSD-src-e1db4e70b3e0f4dcd6006b5380fd6484833c54e5.zip
FreeBSD-src-e1db4e70b3e0f4dcd6006b5380fd6484833c54e5.tar.gz
Conver all explicit instances to VOP_ISLOCKED(arg, NULL) into
VOP_ISLOCKED(arg, curthread). Now, VOP_ISLOCKED() and lockstatus() should only acquire curthread as argument; this will lead in axing the additional argument from both functions, making the code cleaner. Reviewed by: jeff, kib
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 877b401..d64b354 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -606,7 +606,7 @@ lockstatus(lkp, td)
int lock_type = 0;
int interlocked;
- KASSERT(td == NULL || td == curthread,
+ KASSERT(td == curthread,
("%s: thread passed argument (%p) is not valid", __func__, td));
if (!kdb_active) {
@@ -615,7 +615,7 @@ lockstatus(lkp, td)
} else
interlocked = 0;
if (lkp->lk_exclusivecount != 0) {
- if (td == NULL || lkp->lk_lockholder == td)
+ if (lkp->lk_lockholder == td)
lock_type = LK_EXCLUSIVE;
else
lock_type = LK_EXCLOTHER;
OpenPOWER on IntegriCloud