Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern lockmgr: assert that LK_RETRY is not specified.



details:   https://anonhg.NetBSD.org/src/rev/cb405f859044
branches:  trunk
changeset: 567062:cb405f859044
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sun May 30 20:49:04 2004 +0000

description:
lockmgr: assert that LK_RETRY is not specified.

diffstat:

 sys/kern/kern_lock.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 00a7cdf1fd7e -r cb405f859044 sys/kern/kern_lock.c
--- a/sys/kern/kern_lock.c      Sun May 30 20:48:04 2004 +0000
+++ b/sys/kern/kern_lock.c      Sun May 30 20:49:04 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lock.c,v 1.78 2004/05/25 14:54:57 hannken Exp $   */
+/*     $NetBSD: kern_lock.c,v 1.79 2004/05/30 20:49:04 yamt Exp $      */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.78 2004/05/25 14:54:57 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.79 2004/05/30 20:49:04 yamt Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_lockdebug.h"
@@ -556,6 +556,8 @@
 
        error = 0;
 
+       KASSERT((flags & LK_RETRY) == 0);
+
        INTERLOCK_ACQUIRE(lkp, lkp->lk_flags, s);
        if (flags & LK_INTERLOCK)
                simple_unlock(interlkp);



Home | Main Index | Thread Index | Old Index