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 2022/01/03 15:18:44 UTC

[GitHub] [incubator-nuttx] PetervdPerk-NXP commented on issue #5142: FlexCAN can_input() should not be called directly from interrupt handler

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

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