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:
parent
8a72ab1a50
commit
e981a5c8bc
@ -83,6 +83,11 @@ static int nxtask_assign_pid(FAR struct tcb_s *tcb)
|
|||||||
int tries;
|
int tries;
|
||||||
int ret = ERROR;
|
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
|
/* Protect the following operation with a critical section
|
||||||
* because g_pidhash is accessed from an interrupt context
|
* 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;
|
tcb->pid = next_pid;
|
||||||
|
|
||||||
ret = OK;
|
ret = OK;
|
||||||
goto errout;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
errout:
|
out:
|
||||||
/* If we get here, then the g_pidhash[] table is completely full.
|
|
||||||
* We cannot allow another task to be started.
|
|
||||||
*/
|
|
||||||
|
|
||||||
leave_critical_section(flags);
|
leave_critical_section(flags);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user