You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by bt...@apache.org on 2021/01/25 06:07:26 UTC
[incubator-nuttx] branch master updated: sched: task: Fix comments
and label in nxtask_assign_pid()
This is an automated email from the ASF dual-hosted git repository.
btashton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new e981a5c sched: task: Fix comments and label in nxtask_assign_pid()
e981a5c is described below
commit e981a5c8bc757fef62c4db7cf41e824cb68bb20c
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Mon Jan 25 14:28:52 2021 +0900
sched: task: Fix comments and label in nxtask_assign_pid()
Summary:
- This commit fixes comments and label in nxtask_assign_pid()
Impact:
- None
Testing:
- Built with spresense:wifi
Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
sched/task/task_setup.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/sched/task/task_setup.c b/sched/task/task_setup.c
index 87e9124..82e93a0 100644
--- a/sched/task/task_setup.c
+++ b/sched/task/task_setup.c
@@ -83,6 +83,11 @@ static int nxtask_assign_pid(FAR struct tcb_s *tcb)
int tries;
int ret = ERROR;
+ /* NOTE:
+ * ERROR means that the g_pidhash[] table is completely full.
+ * We cannot allow another task to be started.
+ */
+
/* Protect the following operation with a critical section
* because g_pidhash is accessed from an interrupt context
*/
@@ -123,14 +128,11 @@ static int nxtask_assign_pid(FAR struct tcb_s *tcb)
tcb->pid = next_pid;
ret = OK;
- goto errout;
+ goto out;
}
}
-errout:
- /* If we get here, then the g_pidhash[] table is completely full.
- * We cannot allow another task to be started.
- */
+out:
leave_critical_section(flags);
return ret;