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 2022/04/12 02:35:24 UTC

[GitHub] [incubator-nuttx] anjiahao1 commented on a diff in pull request #6038: sched/pthread_create:fix bug,delete data_sem

anjiahao1 commented on code in PR #6038:
URL: https://github.com/apache/incubator-nuttx/pull/6038#discussion_r847891204


##########
sched/pthread/pthread_create.c:
##########
@@ -529,37 +521,28 @@ int nx_pthread_create(pthread_trampoline_t trampoline, FAR pthread_t *thread,
   pid = ptcb->cmn.pid;
   pjoin->thread = (pthread_t)pid;
 
-  /* Initialize the semaphores in the join structure to zero. */
+  /* Initialize the semaphore in the join structure to zero. */
 
-  ret = nxsem_init(&pjoin->data_sem, 0, 0);

Review Comment:
   don't need it,data_sem is used to make sure a thread start when create,in this pacth,delete it,The new thread created will be handed over to the scheduler to start.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org