From: Ben Gras Date: Thu, 29 Jan 2009 15:13:54 +0000 (+0000) Subject: disable interrupts if necessary in kernel debug code to dump all process X-Git-Tag: v3.1.4~119 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/verify-sign/verify.pl?a=commitdiff_plain;h=113932905f96cb1bba9779e7c35dc43d1b9c774e;p=minix.git disable interrupts if necessary in kernel debug code to dump all process stacks. --- diff --git a/kernel/arch/i386/system.c b/kernel/arch/i386/system.c index 00e6bde35..6eaef954b 100644 --- a/kernel/arch/i386/system.c +++ b/kernel/arch/i386/system.c @@ -156,6 +156,10 @@ PRIVATE void ser_debug(int c) PUBLIC void ser_dump_proc() { struct proc *pp; + int u = 0; + + /* Disable interrupts so that we get a consistent state. */ + if(!intr_disabled()) { lock; u = 1; }; for (pp= BEG_PROC_ADDR; pp < END_PROC_ADDR; pp++) { @@ -171,6 +175,8 @@ PUBLIC void ser_dump_proc() pp->p_reg.pc); proc_stacktrace(pp); } + + if(u) { unlock; } } PRIVATE void ser_dump_stats()