xiaoxiang781216 commented on PR #16194: URL: https://github.com/apache/nuttx/pull/16194#issuecomment-2854058081
> > It doesn't make sense to boost the thread which pass nxsem_wait on a counting semaphore, since the priority boost is meaningful only for a mutex(binary semaphore). That's why I suggest that we can drop the holder of counting semaphores directly. > > I don't believe this is 100% true; currently the priority inheritance is supported also on counting semaphores. I also believe that if you really need to protect from priority inversion you'll need to have priority inheritance also on counting semaphores... Counting semaphore is normally waited(event) in one thread, but posted(event) in another thread(or even interrupt context), the holder doesn't make any sense and totally wrong in this case. The holder concept only make sense when the sem_wait and sem_post is called in the same thread(binary semaphore case). @patacongo could you give some comment about this problem? > Removing that would need quite strong agreement from the community that it is not really needed! > Yes, let's vote on the dev list. > Since the support is there, I'd hesitate removing that, and leaving it to the users to decide whether they want to disable priority inheritance on a counting semaphore or not. Yes, it should be belong another 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org