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:
parent
3c84278aa7
commit
5c748cea2a
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user