Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern Don't use KASSERT() to test for ex...



details:   https://anonhg.NetBSD.org/src/rev/67f6003ac408
branches:  trunk
changeset: 339895:67f6003ac408
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sun Aug 16 11:06:54 2015 +0000

description:
Don't use KASSERT() to test for external return values, use panic()

from Robert Millan <rmh%freebsd.org@localhost>

diffstat:

 sys/rump/librump/rumpkern/intr.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 537d857363d5 -r 67f6003ac408 sys/rump/librump/rumpkern/intr.c
--- a/sys/rump/librump/rumpkern/intr.c  Sun Aug 16 11:05:06 2015 +0000
+++ b/sys/rump/librump/rumpkern/intr.c  Sun Aug 16 11:06:54 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.52 2015/04/22 17:38:33 pooka Exp $  */
+/*     $NetBSD: intr.c,v 1.53 2015/08/16 11:06:54 pooka Exp $  */
 
 /*
  * Copyright (c) 2008-2010, 2015 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.52 2015/04/22 17:38:33 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.53 2015/08/16 11:06:54 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -127,7 +127,10 @@
 
                error = rumpuser_clock_sleep(RUMPUSER_CLOCK_ABSMONO,
                    curclock.tv_sec, curclock.tv_nsec);
-               KASSERT(!error);
+               if (error) {
+                       panic("rumpuser_clock_sleep failed with error %d",
+                           error);
+               }
                timespecadd(&curclock, &thetick, &curclock);
        }
 }



Home | Main Index | Thread Index | Old Index