summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_synch.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 3ea27fcdc6d..b81d8b9dc99 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_synch.c,v 1.123 2015/09/11 19:13:22 dlg Exp $ */
+/* $OpenBSD: kern_synch.c,v 1.124 2015/09/28 18:36:36 deraadt Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*
@@ -49,6 +49,7 @@
#include <sys/syscallargs.h>
#include <sys/pool.h>
#include <sys/refcnt.h>
+#include <ddb/db_output.h>
#include <machine/spinlock.h>
@@ -115,6 +116,8 @@ tsleep(const volatile void *ident, int priority, const char *wmesg, int timo)
KASSERT(timo || __mp_lock_held(&kernel_lock));
#endif
+ if (cold == 2)
+ db_stack_dump();
if (cold || panicstr) {
int s;
/*