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 2021/11/09 04:11:18 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #4782: sem: remove limitation of irq context when do sem_trywait

xiaoxiang781216 edited a comment on pull request #4782:
URL: https://github.com/apache/incubator-nuttx/pull/4782#issuecomment-963799515


   > Is this a good idea? Allocating memory in an interrupt context can effect latency and add jitter.
   > This will actually make the `free` part succeed, 
   
   The intent of change is allowing https://github.com/apache/incubator-nuttx/pull/4759 can do the check even in the interrupt context.
   
   > and we will be freeing memory if we successfully get the lock on the first try. `malloc` in the other hand only `DEBUGVERIFY` the check, when debug options are disabled we are then allocating memory and possibly without holding the lock?
   
   How about we add DEBUGASSERT in malloc/free to catch the wrong usage?
   


-- 
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-unsubscribe@nuttx.apache.org

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