Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern autoconf(9): Improve diagnostics for config_detach_...
details: https://anonhg.NetBSD.org/src/rev/e7521f6b4968
branches: trunk
changeset: 370042:e7521f6b4968
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Sep 13 09:40:38 2022 +0000
description:
autoconf(9): Improve diagnostics for config_detach_enter/commit/exit.
diffstat:
sys/kern/subr_autoconf.c | 28 ++++++++++++++++++----------
1 files changed, 18 insertions(+), 10 deletions(-)
diffs (66 lines):
diff -r 9c9129a0aa50 -r e7521f6b4968 sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c Tue Sep 13 09:40:17 2022 +0000
+++ b/sys/kern/subr_autoconf.c Tue Sep 13 09:40:38 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.304 2022/08/24 11:19:25 riastradh Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.305 2022/09/13 09:40:38 riastradh Exp $ */
/*
* Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.304 2022/08/24 11:19:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.305 2022/09/13 09:40:38 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -1949,11 +1949,13 @@
* all new attempts to acquire references to block.
*/
KASSERTMSG((l = dev->dv_attaching) == NULL,
- "lwp %ld [%s] @ %p attaching",
- (long)l->l_lid, (l->l_name ? l->l_name : l->l_proc->p_comm), l);
+ "lwp %ld [%s] @ %p attaching %s",
+ (long)l->l_lid, (l->l_name ? l->l_name : l->l_proc->p_comm), l,
+ device_xname(dev));
KASSERTMSG((l = dev->dv_detaching) == NULL,
- "lwp %ld [%s] @ %p detaching",
- (long)l->l_lid, (l->l_name ? l->l_name : l->l_proc->p_comm), l);
+ "lwp %ld [%s] @ %p detaching %s",
+ (long)l->l_lid, (l->l_name ? l->l_name : l->l_proc->p_comm), l,
+ device_xname(dev));
dev->dv_detaching = curlwp;
out: mutex_exit(&config_misc_lock);
@@ -1966,9 +1968,12 @@
struct lwp *l __diagused;
mutex_enter(&config_misc_lock);
+ KASSERTMSG(dev->dv_detaching != NULL, "not detaching %s",
+ device_xname(dev));
KASSERTMSG((l = dev->dv_detaching) == curlwp,
- "lwp %ld [%s] @ %p detaching",
- (long)l->l_lid, (l->l_name ? l->l_name : l->l_proc->p_comm), l);
+ "lwp %ld [%s] @ %p detaching %s",
+ (long)l->l_lid, (l->l_name ? l->l_name : l->l_proc->p_comm), l,
+ device_xname(dev));
dev->dv_detaching = NULL;
cv_broadcast(&config_misc_cv);
mutex_exit(&config_misc_lock);
@@ -2182,9 +2187,12 @@
struct lwp *l __diagused;
mutex_enter(&config_misc_lock);
+ KASSERTMSG(dev->dv_detaching != NULL, "not detaching %s",
+ device_xname(dev));
KASSERTMSG((l = dev->dv_detaching) == curlwp,
- "lwp %ld [%s] @ %p detaching",
- (long)l->l_lid, (l->l_name ? l->l_name : l->l_proc->p_comm), l);
+ "lwp %ld [%s] @ %p detaching %s",
+ (long)l->l_lid, (l->l_name ? l->l_name : l->l_proc->p_comm), l,
+ device_xname(dev));
dev->dv_detached = true;
cv_broadcast(&config_misc_cv);
mutex_exit(&config_misc_lock);
Home |
Main Index |
Thread Index |
Old Index