From d48aa65684e8fc395face2501a8fb6806884f7ea Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Tue, 22 May 2007 15:17:41 +0000 Subject: [PATCH] more debug info for deadlocks. git-svn-id: file:///svn/unbound/trunk@331 be551aaa-1e26-0410-a405-d3ace91eadb9 --- testcode/checklocks.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testcode/checklocks.c b/testcode/checklocks.c index 61996227e..b85cda088 100644 --- a/testcode/checklocks.c +++ b/testcode/checklocks.c @@ -67,6 +67,9 @@ int check_locking_order = 1; /** the pid of this runset, reasonably unique. */ static pid_t check_lock_pid; +/** print all possible debug info on the state of the system */ +static void total_debug_info(); + /** print pretty lock error and exit */ static void lock_error(struct checked_lock* lock, const char* func, const char* file, int line, const char* err) @@ -82,6 +85,8 @@ static void lock_error(struct checked_lock* lock, (lock->type==check_lock_mutex)?"mutex": ( (lock->type==check_lock_spinlock)?"spinlock": ( (lock->type==check_lock_rwlock)?"rwlock": "badtype")), err); + log_err("complete status display:"); + total_debug_info(); fatal_exit("bailing out"); } @@ -769,7 +774,6 @@ thread_debug_info(struct thr_check* thr) held_debug_info(thr, f); } -/** print all possible debug info on the state of the system */ static void total_debug_info() { -- 2.47.2