anchao commented on code in PR #14032:
URL: https://github.com/apache/nuttx/pull/14032#discussion_r1795011887
##########
sched/pthread/pthread_create.c:
##########
@@ -442,19 +442,19 @@ int nx_pthread_create(pthread_trampoline_t trampoline,
FAR pthread_t *thread,
#endif
}
- /* Then activate the task */
-
sched_lock();
- nxtask_activate((FAR struct tcb_s *)ptcb);
-
/* Return the thread information to the caller */
if (thread != NULL)
{
*thread = (pthread_t)ptcb->cmn.pid;
}
+ /* Then activate the task */
+
+ nxtask_activate((FAR struct tcb_s *)ptcb);
+
sched_unlock();
Review Comment:
Emm, sorry, I have misunderstood the intention of this 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]