diff options
Diffstat (limited to 'nuttx/sched/task_create.c')
-rw-r--r-- | nuttx/sched/task_create.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nuttx/sched/task_create.c b/nuttx/sched/task_create.c index 4d92c9bb0..801706cbf 100644 --- a/nuttx/sched/task_create.c +++ b/nuttx/sched/task_create.c @@ -169,6 +169,8 @@ static int thread_create(const char *name, uint8_t type, int priority, ret = task_activate(tcb); if (ret != OK) { + /* The TCB was added to the active task list by task_schedsetup() */ + dq_rem((FAR dq_entry_t*)tcb, (dq_queue_t*)&g_inactivetasks); goto errout_with_tcb; } |