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/03 14:24:40 UTC

[GitHub] [incubator-nuttx] patacongo commented on issue #1354: Bug in can driver: wrong use of nxsem_get_value

patacongo commented on issue #1354:
URL: https://github.com/apache/incubator-nuttx/issues/1354#issuecomment-653572428


   > The DEBUGASSERT to cd_nrxwaiters < 255 is there to guarantee we will have less than 255 threads reading the data.
   
   There is no particular limit.  But cs_nrxwaiters is a uint8_t so this test is really only checking to assure that the uint8_t does not overflow.
   
   ASSERTs in fielded code should be avoided.  Assertions are useful during debug but do not improve the quality of a fielded, buckled-up, embedded system.  They are product failures if they occur in a fielded product and only increase code size.
   
   Embedded systems must be nearly error-free.  ASSERTs are errors.
   
   


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