sched: Don't need call get_errno after task_activate

since task_activate don't save the error code into errno

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-05-03 19:40:02 +08:00 committed by patacongo
parent 3c84278aa7
commit 5c748cea2a
3 changed files with 0 additions and 8 deletions

View File

@ -257,7 +257,6 @@ int exec_module(FAR const struct binary_s *binp)
ret = task_activate((FAR struct tcb_s *)tcb);
if (ret < 0)
{
ret = -get_errno();
berr("task_activate() failed: %d\n", ret);
goto errout_with_tcbinit;
}

View File

@ -570,10 +570,6 @@ int pthread_create(FAR pthread_t *thread, FAR const pthread_attr_t *attr,
if (ret == OK)
{
ret = task_activate((FAR struct tcb_s *)ptcb);
if (ret < 0)
{
ret = get_errno();
}
}
if (ret == OK)

View File

@ -148,9 +148,6 @@ static int nxthread_create(FAR const char *name, uint8_t ttype,
ret = task_activate((FAR struct tcb_s *)tcb);
if (ret < OK)
{
ret = -get_errno();
DEBUGASSERT(ret < 0);
/* The TCB was added to the active task list by nxtask_schedsetup() */
dq_rem((FAR dq_entry_t *)tcb, (FAR dq_queue_t *)&g_inactivetasks);