You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/07/05 18:15:17 UTC

[GitHub] [incubator-nuttx] patacongo commented on pull request #1371: drivers/can: correct checking sem is locked

patacongo commented on pull request #1371:
URL: https://github.com/apache/incubator-nuttx/pull/1371#issuecomment-653921030


   > could you please explain, why in some other places `sval < 0` is used?
   
   Semaphore counts can be interrupreted this way:
   
   - nsem > 0 : There are nsem counts remaining on the semaphore; no tasks are waiting for a count
   - nsem == 0: There are no remaining counts on the semaphore but no task are waiting for a count
   - nsem < 0: There are not remaining counts on the semaphore and -nsem tasks are waiting for a count
   


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

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