diff options
Diffstat (limited to 'nuttx/sched/task_activate.c')
-rw-r--r-- | nuttx/sched/task_activate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/sched/task_activate.c b/nuttx/sched/task_activate.c index ce574428a..b216cc316 100644 --- a/nuttx/sched/task_activate.c +++ b/nuttx/sched/task_activate.c @@ -90,9 +90,10 @@ STATUS task_activate(FAR _TCB *tcb) { -#ifdef CONFIG_SCHED_INSTRUMENTATION irqstate_t flags = irqsave(); +#ifdef CONFIG_SCHED_INSTRUMENTATION + /* Check if this is really a re-start */ if (tcb->task_state != TSTATE_TASK_INACTIVE) @@ -109,9 +110,9 @@ STATUS task_activate(FAR _TCB *tcb) */ sched_note_start(tcb); - irqrestore(flags); #endif up_unblock_task(tcb); + irqrestore(flags); return OK; } |