From 1d4c9574f9b69daa80c9cfb20efb2c29c5cb5e85 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sun, 28 Sep 2003 03:37:32 +0000 Subject: [PATCH] Try to generate more debugging information when the critical nesting count gets too deep (which indicates a crit_enter/exit or lwkt_gettoken/reltoken mismatch somewhere). --- sys/kern/lwkt_thread.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/lwkt_thread.c b/sys/kern/lwkt_thread.c index 9780d3cfdf..38c9dd1992 100644 --- a/sys/kern/lwkt_thread.c +++ b/sys/kern/lwkt_thread.c @@ -28,7 +28,7 @@ * to use a critical section to avoid problems. Foreign thread * scheduling is queued via (async) IPIs. * - * $DragonFly: src/sys/kern/lwkt_thread.c,v 1.31 2003/09/25 23:49:09 dillon Exp $ + * $DragonFly: src/sys/kern/lwkt_thread.c,v 1.32 2003/09/28 03:37:32 dillon Exp $ */ #include @@ -999,6 +999,10 @@ lwkt_gettoken(lwkt_token_t tok) crit_enter(); #ifdef INVARIANTS + if (curthread->td_pri > 1800) { + printf("lwkt_gettoken: %p called from %p: crit sect nesting warning\n", + tok, ((int **)&tok)[-1]); + } if (curthread->td_pri > 2000) { curthread->td_pri = 1000; panic("too HIGH!"); -- 2.41.0