This is an automated email from the ASF dual-hosted git repository. gnutt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 5c748cea2ad986ca674d562f049c8e4902dd58f6 Author: Xiang Xiao <xiaoxi...@xiaomi.com> AuthorDate: Sun May 3 19:40:02 2020 +0800 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 <xiaoxi...@xiaomi.com> --- binfmt/binfmt_execmodule.c | 1 - sched/pthread/pthread_create.c | 4 ---- sched/task/task_create.c | 3 --- 3 files changed, 8 deletions(-) diff --git a/binfmt/binfmt_execmodule.c b/binfmt/binfmt_execmodule.c index dd19c82..ad1bff0 100644 --- a/binfmt/binfmt_execmodule.c +++ b/binfmt/binfmt_execmodule.c @@ -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; } diff --git a/sched/pthread/pthread_create.c b/sched/pthread/pthread_create.c index e2e2003..4d825b7 100644 --- a/sched/pthread/pthread_create.c +++ b/sched/pthread/pthread_create.c @@ -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) diff --git a/sched/task/task_create.c b/sched/task/task_create.c index 9bc105c..e026619 100644 --- a/sched/task/task_create.c +++ b/sched/task/task_create.c @@ -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);