pussuw commented on PR #16194:
URL: https://github.com/apache/nuttx/pull/16194#issuecomment-2854759698

   > Counting semaphore is normally waited(event) in one thread, but 
posted(event) in another thread(or even interrupt context) yes in this case 
using priority inheritance is totally wrong. For signaling semaphores it will 
just not work.
   
   But nothing prevents multiple threads taking a count on a counting semaphore 
that is *not* used for signaling, but is used e.g. as a resource counter. In 
this case if a higher priority thread cannot get the resource, you need to 
boost. If another even higher priority thread comes along, you need to boost 
again.
   
   The use case for this is not obvious to me, so this problem could be 
superficial. I don't know of examples of this use, maybe there is some driver 
in the NuttX kernel that uses this ?


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