zhaoxiu-zeng commented on a change in pull request #5171:
URL: https://github.com/apache/incubator-nuttx/pull/5171#discussion_r787400505



##########
File path: sched/semaphore/sem_holder.c
##########
@@ -954,11 +867,8 @@ void nxsem_add_holder_tcb(FAR struct tcb_s *htcb, FAR 
sem_t *sem)
       pholder = nxsem_findorallocateholder(sem, htcb);
       if (pholder != NULL)
         {
-          /* Then set the holder and increment the number of counts held by
-           * this holder
-           */
+          /* Increment the number of counts held by this holder */
 
-          pholder->htcb = htcb;
           pholder->counts++;

Review comment:
       I think we should add a constraint that only the holder task can call 
nxsem_release_holder just like other OS mutexes, then there is no such problems.




-- 
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-unsubscr...@nuttx.apache.org

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


Reply via email to