forked from Imagelibrary/rtems
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?
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user