diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-08-31 22:53:42 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-08-31 22:53:42 +0000 |
commit | 85734b3c8f00abe81af80bd0a7e00874d6635104 (patch) | |
tree | 0f03aa14ceca9f9652f1606ff931e99556b55c35 /c/src | |
parent | Updated the descriptions section for the log_create and log_sys_create (diff) | |
download | rtems-85734b3c8f00abe81af80bd0a7e00874d6635104.tar.bz2 |
Patch from Eric Norum <eric@skatter.usask.ca>:
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?
Diffstat (limited to 'c/src')
-rw-r--r-- | c/src/exec/libcsupport/src/error.c | 6 | ||||
-rw-r--r-- | c/src/lib/libc/error.c | 6 | ||||
-rw-r--r-- | c/src/lib/libmisc/error/error.c | 6 | ||||
-rw-r--r-- | c/src/libmisc/error/error.c | 6 |
4 files changed, 8 insertions, 16 deletions
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) diff --git a/c/src/lib/libc/error.c b/c/src/lib/libc/error.c index ab4693609e..dd32fb8b66 100644 --- a/c/src/lib/libc/error.c +++ b/c/src/lib/libc/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) diff --git a/c/src/lib/libmisc/error/error.c b/c/src/lib/libmisc/error/error.c index ab4693609e..dd32fb8b66 100644 --- a/c/src/lib/libmisc/error/error.c +++ b/c/src/lib/libmisc/error/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) diff --git a/c/src/libmisc/error/error.c b/c/src/libmisc/error/error.c index ab4693609e..dd32fb8b66 100644 --- a/c/src/libmisc/error/error.c +++ b/c/src/libmisc/error/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) |