summaryrefslogtreecommitdiff
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>1999-06-28 07:54:58 +0000
committerKirk McKusick <mckusick@FreeBSD.org>1999-06-28 07:54:58 +0000
commit33638e9384629666c33aef14b8211a8a54b94094 (patch)
tree92909118fc9ba81bc2fe0fdffd0a771156ac2f7b /sys/kern/kern_lock.c
parent46d2febf9d86d3010e4ccef0d896b97b5a5d8e7a (diff)
Notes
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index c7e9c84350e4..35f6567dabdd 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.25 1999/03/15 05:11:27 julian Exp $
+ * $Id: kern_lock.c,v 1.26 1999/06/26 02:46:00 mckusick Exp $
*/
#include "opt_lint.h"
@@ -337,12 +337,14 @@ debuglockmgr(lkp, flags, interlkp, p, name, file, line)
* Recursive lock.
*/
#if !defined(MAX_PERF)
- if ((extflags & LK_CANRECURSE) == 0)
+ if ((extflags & (LK_NOWAIT | LK_CANRECURSE)) == 0)
panic("lockmgr: locking against myself");
#endif
- lkp->lk_exclusivecount++;
- COUNT(p, 1);
- break;
+ if ((extflags & LK_CANRECURSE) != 0) {
+ lkp->lk_exclusivecount++;
+ COUNT(p, 1);
+ break;
+ }
}
/*
* If we are just polling, check to see if we will sleep.