From 85734b3c8f00abe81af80bd0a7e00874d6635104 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 31 Aug 1998 22:53:42 +0000 Subject: Patch from Eric Norum : I think I figured out why rtems_panic was locking up instead of shutting down the executive and returning to the code that called boot_card(). Later on there is code to print some messages on the standard error stream, a recursive call back to rtems_verror (through rtems_error) and finally a call to _exit(). I think that the _Thread_Disable_dispatch() is preventing the final context switch back to the boot_card() code. Does this sound right to you? --- c/src/exec/libcsupport/src/error.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'c/src/exec/libcsupport') diff --git a/c/src/exec/libcsupport/src/error.c b/c/src/exec/libcsupport/src/error.c index ab4693609e..dd32fb8b66 100644 --- a/c/src/exec/libcsupport/src/error.c +++ b/c/src/exec/libcsupport/src/error.c @@ -115,10 +115,8 @@ static int rtems_verror( if (error_flag & RTEMS_ERROR_PANIC) { - rtems_panic_in_progress++; - - /* disable task switches */ - _Thread_Disable_dispatch(); + if (rtems_panic_in_progress++) + _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) -- cgit v1.2.3