From 05fa71ba43050f8d2191250b09f65df947e94d8a Mon Sep 17 00:00:00 2001 From: Attilio Rao Date: Thu, 5 Feb 2009 15:09:04 +0000 Subject: [PATCH] Remove the assertive KA_HELD and KA_UNHELD as long as they are dangerous, and not really helpful. --- share/man/man9/lock.9 | 19 +------------------ sys/sys/lockmgr.h | 2 -- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/share/man/man9/lock.9 b/share/man/man9/lock.9 index 99af66f5965b..d2edc0e81205 100644 --- a/share/man/man9/lock.9 +++ b/share/man/man9/lock.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 12, 2008 +.Dd February 05, 2009 .Dt LOCK 9 .Os .Sh NAME @@ -279,14 +279,6 @@ lock pointed to by the first argument. Assert that the current thread has no lock on the .Vt lkp lock pointed to by the first argument. -.It Dv KA_HELD -Assert that an unspecified thread has a lock on the -.Vt lkp -lock pointed to by the first argument. -.It Dv KA_UNHELD -Assert that no thread has a lock on the -.Vt lkp -lock pointed to by the first argument. .El .Pp In addition, one of the following optional assertions can be used with @@ -305,15 +297,6 @@ Assert that the current thread does not have a recursed lock on .Fa lkp . .El .Pp -Note that -.Dv KA_HELD -and -.Dv KA_UNHELD -usage is highly discouraged. -They are intended to cater a bad behaviour -introduced by buffer cache lock handling. -They will hopefully be -made useless by revisiting such locks. .Sh RETURN VALUES The .Fn lockmgr diff --git a/sys/sys/lockmgr.h b/sys/sys/lockmgr.h index 21831440ea05..8be7fb873c64 100644 --- a/sys/sys/lockmgr.h +++ b/sys/sys/lockmgr.h @@ -183,8 +183,6 @@ _lockmgr_args_rw(struct lock *lk, u_int flags, struct rwlock *ilk, #define KA_UNLOCKED LA_UNLOCKED #define KA_RECURSED LA_RECURSED #define KA_NOTRECURSED LA_NOTRECURSED -#define KA_HELD -#define KA_UNHELD #endif #endif /* _KERNEL */