Source-Changes-HG archive

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

[src/trunk]: src/sys/kern callout_destroy(): change output from a couple of a...



details:   https://anonhg.NetBSD.org/src/rev/f360211bb624
branches:  trunk
changeset: 746048:f360211bb624
user:      ad <ad%NetBSD.org@localhost>
date:      Sat Mar 21 02:32:37 2020 +0000

description:
callout_destroy(): change output from a couple of assertions so it's clear
what they are checking for (callout being destroyed while pending/running).

diffstat:

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

diffs (32 lines):

diff -r e166a4c86fd9 -r f360211bb624 sys/kern/kern_timeout.c
--- a/sys/kern/kern_timeout.c   Sat Mar 21 01:17:51 2020 +0000
+++ b/sys/kern/kern_timeout.c   Sat Mar 21 02:32:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_timeout.c,v 1.58 2020/01/23 20:44:15 ad Exp $     */
+/*     $NetBSD: kern_timeout.c,v 1.59 2020/03/21 02:32:37 ad Exp $     */
 
 /*-
  * Copyright (c) 2003, 2006, 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.58 2020/01/23 20:44:15 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.59 2020/03/21 02:32:37 ad Exp $");
 
 /*
  * Timeouts are kept in a hierarchical timing wheel.  The c_time is the
@@ -315,9 +315,11 @@
         * running, the current thread should have stopped it.
         */
        KASSERTMSG((c->c_flags & CALLOUT_PENDING) == 0,
-           "callout %p: c_func (%p) c_flags (%#x) destroyed from %p",
+           "pending callout %p: c_func (%p) c_flags (%#x) destroyed from %p",
            c, c->c_func, c->c_flags, __builtin_return_address(0));
-       KASSERT(c->c_cpu->cc_lwp == curlwp || c->c_cpu->cc_active != c);
+       KASSERTMSG(c->c_cpu->cc_lwp == curlwp || c->c_cpu->cc_active != c,
+           "running callout %p: c_func (%p) c_flags (%#x) destroyed from %p",
+           c, c->c_func, c->c_flags, __builtin_return_address(0));
        c->c_magic = 0;
 }
 



Home | Main Index | Thread Index | Old Index