PetervdPerk-NXP commented on issue #5142:
URL: 
https://github.com/apache/incubator-nuttx/issues/5142#issuecomment-1004162622


   Interesting the comment above the function suggest it wouldn't block and 
didn't specify it's not allowed to be executed while in an interrupt. 
https://github.com/apache/incubator-nuttx/blob/9a53601ba993d43684328dcae8750acb00a34cc7/sched/semaphore/sem_trywait.c#L45-L48
   
   The reason why it's called under an interrupt is because Unfortunely using a 
workqueue it's too slow to react and would cause an CAN RX mailbox overflow. 
That's why we try to get rid of asap while in the interrupt but only if we can 
access the lock hence the net_trylock().
   
   A better solution would to figure why scheduling a workqueue with an 
immediate deadline takes quite to long to be scheduled but I never came to that.


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


Reply via email to