This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I have a queue for holding CAN messages. In the CAN ISR, when a message is received, it is put into the queue. In the main loop, messages are taken out of the queue.
I want to have a mutex when putting messages in the queue and when messages are taken out. What is the best why to do this?