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



##########
File path: sched/semaphore/sem_holder.c
##########
@@ -1035,18 +944,57 @@ void nxsem_release_holder(FAR sem_t *sem)
 {
   FAR struct tcb_s *rtcb = this_task();
   FAR struct semholder_s *pholder;
+  FAR struct semholder_s *candidate = NULL;
+  unsigned int total = 0;

Review comment:
       If there are 2 holders (not the rtcb) with the same counts which is 1, 
whoever is chosen will break the priority inheritance.
   If neither pholder->htcb == rtcb nor total == 1 is met, it should be the 
wrong usage of semaphore. Currently do nothing, as the original code. Leave it 
for later for us to find a smarter way, or change the design.
   




-- 
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