patacongo opened a new pull request, #8938:
URL: https://github.com/apache/nuttx/pull/8938

   ## Summary
   
   Assert in `nxsem_post()` if:
   
   - Priority inheritance is enabled on the semaphore
   - A thread that does not hold the semaphore attempts to post it
   
   This will detect an error condition described in 
https://cwiki.apache.org/confluence/display/NUTTX/Signaling+Semaphores+and+Priority+Inheritance
   
   ## Impact
   
   None.  The debug instrumentation is only enabled if 
`CONFIG_DEBUG_ASSERTIONS` is enabled.
   
   When `CONFIG_DEBUG_ASSERTIONS` is enabled there is a possibility of new 
assertions.  These could happen if:
   
   - There are errors in usage as described on the Confluence Wiki page (that 
is a good thing, a good impact), or
   - These is some valid, corner case usage of `sem_post()` that is not handled 
by the assertion logic.
   
   The assertion logic is also rather heavyweight and could affect performance 
when `CONFIG_DEBUG_ASSERTIONS ` is enabled.
   
   ## Testing
   
   Used `sim:ostest `and `sim:nsh`.  Ran normal tests fairly extensively and 
verified that no assertions occurred with the presumed good logic.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to