summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_shutdown.c
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2002-07-17 02:23:44 +0000
committergallatin <gallatin@FreeBSD.org>2002-07-17 02:23:44 +0000
commitb6368d35106f2181ca1d6536cbb3e1fab2a5b3c0 (patch)
tree5924547463c69dff00bd745cf367d4a708e9a16e /sys/kern/kern_shutdown.c
parent3abb526f86a27b005f352fb91f605228876fa8f7 (diff)
downloadFreeBSD-src-b6368d35106f2181ca1d6536cbb3e1fab2a5b3c0.zip
FreeBSD-src-b6368d35106f2181ca1d6536cbb3e1fab2a5b3c0.tar.gz
Allow alphas to do crashdumps: Refuse to run anything in choosethread()
after a panic which is not an interrupt thread, or the thread which caused the panic. Also, remove panicstr checks from msleep() and from cv_wait() in order to allow threads to go to sleep and yeild the cpu to the panicing thread, or to an interrupt thread which might be doing the crashdump. Reviewed by: jhb (and it was mostly his idea too)
Diffstat (limited to 'sys/kern/kern_shutdown.c')
-rw-r--r--sys/kern/kern_shutdown.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 209c22e..13a9c7a 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -433,6 +433,7 @@ static u_int panic_cpu = NOCPU;
void
panic(const char *fmt, ...)
{
+ struct thread *td = curthread;
int bootopt;
va_list ap;
static char buf[256];
@@ -486,6 +487,7 @@ panic(const char *fmt, ...)
}
#endif
#endif
+ td->td_flags |= TDF_INPANIC;
if (!sync_on_panic)
bootopt |= RB_NOSYNC;
boot(bootopt);
OpenPOWER on IntegriCloud