diff options
Diffstat (limited to 'c/src/lib/libc/error.c')
-rw-r--r-- | c/src/lib/libc/error.c | 6 |
1 files changed, 2 insertions, 4 deletions
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) |