In queue.c, I noticed the following description about prvLock/UnlockQueue:
/* * Unlocks a queue locked by a call to prvLockQueue. Locking a queue does not * prevent an ISR from adding or removing items to the queue, but does prevent * an ISR from removing tasks from the queue event lists. If an ISR finds a * queue is locked it will instead increment the appropriate queue lock count * to indicate that a task may require unblocking. When the queue in unlocked * these lock counts are inspected, and the appropriate action taken. */ static void prvUnlockQueue( Queue_t * const pxQueue ) PRIVILEGED_FUNCTION;
Does that mean it’s dangerous to edit the queue event list while running from an ISR?
If so, I’m trying to understand why there is no check to see if the queue is locked in prvNotifyQueueSetContainer where the following path can be reached:
xQueueGenericSendFromISR() -> prvNotifyQueueSetContainer() -> xTaskRemoveFromEventList()
Thanks for any help!