- /* We are going to place ourselves on the xTasksWaitingToSend event\r
- list, and will get woken should the delay expire, or space become\r
- available on the queue.\r
- \r
- As detailed above we do not require mutual exclusion on the event\r
- list as nothing else can modify it or the ready lists while we\r
- have the scheduler suspended and queue locked.\r
- \r
- It is possible that an ISR has removed data from the queue since we\r
- checked if any was available. If this is the case then the data\r
- will have been copied from the queue, and the queue variables\r
- updated, but the event list will not yet have been checked to see if\r
- anything is waiting as the queue is locked. */\r
- vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );\r
-\r
- /* Force a context switch now as we are blocked. We can do\r
- this from within a critical section as the task we are\r
- switching to has its own context. When we return here (i.e. we\r
- unblock) we will leave the critical section as normal.\r
- \r
- It is possible that an ISR has caused an event on an unrelated and\r
- unlocked queue. If this was the case then the event list for that\r
- queue will have been updated but the ready lists left unchanged -\r
- instead the readied task will have been added to the pending ready\r
- list. */\r
- taskENTER_CRITICAL();\r