+ /* Check the pointer is not NULL. */\r
+ configASSERT( ( pxQueue ) );\r
+\r
+ /* The buffer into which data is received can only be NULL if the data size\r
+ is zero (so no data is copied into the buffer. */\r
+ configASSERT( !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) );\r
+\r
+ /* Cannot block if the scheduler is suspended. */\r
+ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )\r
+ {\r
+ configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );\r
+ }\r
+ #endif\r
+\r
+\r
+ /* This function relaxes the coding standard somewhat to allow return\r
+ statements within the function itself. This is done in the interest\r
+ of execution time efficiency. */\r
+\r
+ for( ;; )\r
+ {\r
+ taskENTER_CRITICAL();\r
+ {\r
+ const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;\r
+\r
+ /* Is there data in the queue now? To be running the calling task\r
+ must be the highest priority task wanting to access the queue. */\r
+ if( uxMessagesWaiting > ( UBaseType_t ) 0 )\r
+ {\r
+ /* Data available, remove one item. */\r
+ prvCopyDataFromQueue( pxQueue, pvBuffer );\r
+ traceQUEUE_RECEIVE( pxQueue );\r
+ pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;\r
+\r
+ /* There is now space in the queue, were any tasks waiting to\r
+ post to the queue? If so, unblock the highest priority waiting\r
+ task. */\r
+ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )\r
+ {\r
+ if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )\r
+ {\r
+ queueYIELD_IF_USING_PREEMPTION();\r