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 <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2021-01-25 14:28:52 +09:00 committed by Brennan Ashton
parent 8a72ab1a50
commit e981a5c8bc

View File

@ -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;