summaryrefslogtreecommitdiff
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorEivind Eklund <eivind@FreeBSD.org>1999-01-08 17:31:30 +0000
committerEivind Eklund <eivind@FreeBSD.org>1999-01-08 17:31:30 +0000
commit5526d2d920eb17b1507499f35b275b486f7fe8d0 (patch)
treec3aa8110c730b536d4b76b776fd65a60d1a70818 /sys/kern/kern_lock.c
parent95ddc5daa5374332a4bc16c64c498099fa823adf (diff)
Notes
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index f411f145fdfc..0bf31d07c601 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* @(#)kern_lock.c 8.18 (Berkeley) 5/21/95
- * $Id: kern_lock.c,v 1.19 1998/04/17 04:53:44 bde Exp $
+ * $Id: kern_lock.c,v 1.20 1998/11/26 18:50:23 eivind Exp $
*/
#include "opt_lint.h"
@@ -83,14 +83,7 @@ sharelock(struct lock *lkp, int incr) {
static LOCK_INLINE void
shareunlock(struct lock *lkp, int decr) {
-#if defined(DIAGNOSTIC)
- if (lkp->lk_sharecount < decr)
-#if defined(DDB)
- Debugger("shareunlock: count < decr");
-#else
- panic("shareunlock: count < decr");
-#endif
-#endif
+ KASSERT(lkp->lk_sharecount >= decr, ("shareunlock: count < decr"));
if (lkp->lk_sharecount == decr) {
lkp->lk_flags &= ~LK_SHARE_NONZERO;