You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/01/25 04:54:07 UTC
[GitHub] [incubator-nuttx] masayuki2009 commented on a change in pull request #2737: sched: task: Fix a potential bug in nxtask_assign_pid()
masayuki2009 commented on a change in pull request #2737:
URL: https://github.com/apache/incubator-nuttx/pull/2737#discussion_r563462684
##########
File path: sched/task/task_setup.c
##########
@@ -121,17 +122,18 @@ static int nxtask_assign_pid(FAR struct tcb_s *tcb)
#endif
tcb->pid = next_pid;
- sched_unlock();
- return OK;
+ ret = OK;
+ goto errout;
}
}
+errout:
/* If we get here, then the g_pidhash[] table is completely full.
Review comment:
@btashton
> This comment is not correct any more since this is now the return path. Also maybe the label name should change.
Thanks for the comment
@xiaoxiang781216
>Sorry, I don't catch your comment. @masayuki2009 could you create a PR to fix the comment.
Yes, I will create a new PR.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org