diff options
Diffstat (limited to 'core/nds32/task.c')
-rw-r--r-- | core/nds32/task.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/nds32/task.c b/core/nds32/task.c index 1725f2b498..269513092b 100644 --- a/core/nds32/task.c +++ b/core/nds32/task.c @@ -171,6 +171,10 @@ inline int in_interrupt_context(void) task_id_t task_get_current(void) { +#ifdef CONFIG_DEBUG_BRINGUP + /* If we haven't done a context switch then our task ID isn't valid */ + ASSERT(current_task != (task_ *)scratchpad); +#endif return current_task - tasks; } |