diff options
Diffstat (limited to 'core/nds32')
-rw-r--r-- | core/nds32/task.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/nds32/task.c b/core/nds32/task.c index 201c8731fc..bbfc5f79c7 100644 --- a/core/nds32/task.c +++ b/core/nds32/task.c @@ -309,9 +309,11 @@ task_ *next_sched_task(void) #ifdef CONFIG_DEBUG_STACK_OVERFLOW if (*current_task->stack != STACK_UNUSED_VALUE) { int i = task_get_current(); - - panic_printf("\n\nStack overflow in %s task!\n", task_names[i]); - software_panic(PANIC_SW_STACK_OVERFLOW, i); + if (task_enabled(i)) { + panic_printf("\n\nStack overflow in %s task!\n", + task_names[i]); + software_panic(PANIC_SW_STACK_OVERFLOW, i); + } } #endif |