Lines Matching refs:pxQueue
183 static void prvUnlockQueue( Queue_t * const pxQueue ) PRIVILEGED_FUNCTION;
190 static BaseType_t prvIsQueueEmpty( const Queue_t * pxQueue ) PRIVILEGED_FUNCTION;
197 static BaseType_t prvIsQueueFull( const Queue_t * pxQueue ) PRIVILEGED_FUNCTION;
203 static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue,
210 static void prvCopyDataFromQueue( Queue_t * const pxQueue,
219 … static BaseType_t prvNotifyQueueSetContainer( const Queue_t * const pxQueue ) PRIVILEGED_FUNCTION;
250 …static UBaseType_t prvGetDisinheritPriorityAfterTimeout( const Queue_t * const pxQueue ) PRIVILEGE…
258 #define prvLockQueue( pxQueue ) \ argument
261 if( ( pxQueue )->cRxLock == queueUNLOCKED ) \
263 ( pxQueue )->cRxLock = queueLOCKED_UNMODIFIED; \
265 if( ( pxQueue )->cTxLock == queueUNLOCKED ) \
267 ( pxQueue )->cTxLock = queueLOCKED_UNMODIFIED; \
277 #define prvIncrementQueueTxLock( pxQueue, cTxLock ) \ argument
283 ( pxQueue )->cTxLock = ( int8_t ) ( ( cTxLock ) + ( int8_t ) 1 ); \
292 #define prvIncrementQueueRxLock( pxQueue, cRxLock ) \ argument
298 ( pxQueue )->cRxLock = ( int8_t ) ( ( cRxLock ) + ( int8_t ) 1 ); \
307 Queue_t * const pxQueue = xQueue; in xQueueGenericReset() local
311 configASSERT( pxQueue ); in xQueueGenericReset()
313 if( ( pxQueue != NULL ) && in xQueueGenericReset()
314 ( pxQueue->uxLength >= 1U ) && in xQueueGenericReset()
316 ( ( SIZE_MAX / pxQueue->uxLength ) >= pxQueue->uxItemSize ) ) in xQueueGenericReset()
320 … pxQueue->u.xQueue.pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); in xQueueGenericReset()
321 pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; in xQueueGenericReset()
322 pxQueue->pcWriteTo = pxQueue->pcHead; in xQueueGenericReset()
323 …pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - 1U ) * pxQueue->uxItemSiz… in xQueueGenericReset()
324 pxQueue->cRxLock = queueUNLOCKED; in xQueueGenericReset()
325 pxQueue->cTxLock = queueUNLOCKED; in xQueueGenericReset()
334 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) in xQueueGenericReset()
336 if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) in xQueueGenericReset()
353 vListInitialise( &( pxQueue->xTasksWaitingToSend ) ); in xQueueGenericReset()
354 vListInitialise( &( pxQueue->xTasksWaitingToReceive ) ); in xQueueGenericReset()
451 Queue_t * const pxQueue = xQueue; in xQueueGenericGetStaticBuffers() local
455 configASSERT( pxQueue ); in xQueueGenericGetStaticBuffers()
461 if( pxQueue->ucStaticallyAllocated == ( uint8_t ) pdTRUE ) in xQueueGenericGetStaticBuffers()
465 *ppucQueueStorage = ( uint8_t * ) pxQueue->pcHead; in xQueueGenericGetStaticBuffers()
471 *ppxStaticQueue = ( StaticQueue_t * ) pxQueue; in xQueueGenericGetStaticBuffers()
484 *ppucQueueStorage = ( uint8_t * ) pxQueue->pcHead; in xQueueGenericGetStaticBuffers()
487 *ppxStaticQueue = ( StaticQueue_t * ) pxQueue; in xQueueGenericGetStaticBuffers()
946 Queue_t * const pxQueue = xQueue; in xQueueGenericSend() local
950 configASSERT( pxQueue ); in xQueueGenericSend()
951 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); in xQueueGenericSend()
952 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); in xQueueGenericSend()
967 … if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) in xQueueGenericSend()
969 traceQUEUE_SEND( pxQueue ); in xQueueGenericSend()
973 const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting; in xQueueGenericSend()
975 xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); in xQueueGenericSend()
977 if( pxQueue->pxQueueSetContainer != NULL ) in xQueueGenericSend()
986 else if( prvNotifyQueueSetContainer( pxQueue ) != pdFALSE ) in xQueueGenericSend()
1002 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) in xQueueGenericSend()
1004 … if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) in xQueueGenericSend()
1033 xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); in xQueueGenericSend()
1037 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) in xQueueGenericSend()
1039 … if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) in xQueueGenericSend()
1083 traceQUEUE_SEND_FAILED( pxQueue ); in xQueueGenericSend()
1108 prvLockQueue( pxQueue ); in xQueueGenericSend()
1113 if( prvIsQueueFull( pxQueue ) != pdFALSE ) in xQueueGenericSend()
1115 traceBLOCKING_ON_QUEUE_SEND( pxQueue ); in xQueueGenericSend()
1116 vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); in xQueueGenericSend()
1123 prvUnlockQueue( pxQueue ); in xQueueGenericSend()
1138 prvUnlockQueue( pxQueue ); in xQueueGenericSend()
1145 prvUnlockQueue( pxQueue ); in xQueueGenericSend()
1148 traceQUEUE_SEND_FAILED( pxQueue ); in xQueueGenericSend()
1164 Queue_t * const pxQueue = xQueue; in xQueueGenericSendFromISR() local
1168 configASSERT( pxQueue ); in xQueueGenericSendFromISR()
1169 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); in xQueueGenericSendFromISR()
1170 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); in xQueueGenericSendFromISR()
1198 … if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) in xQueueGenericSendFromISR()
1200 const int8_t cTxLock = pxQueue->cTxLock; in xQueueGenericSendFromISR()
1201 const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting; in xQueueGenericSendFromISR()
1203 traceQUEUE_SEND_FROM_ISR( pxQueue ); in xQueueGenericSendFromISR()
1210 ( void ) prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); in xQueueGenericSendFromISR()
1218 if( pxQueue->pxQueueSetContainer != NULL ) in xQueueGenericSendFromISR()
1227 else if( prvNotifyQueueSetContainer( pxQueue ) != pdFALSE ) in xQueueGenericSendFromISR()
1248 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) in xQueueGenericSendFromISR()
1250 … if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) in xQueueGenericSendFromISR()
1276 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) in xQueueGenericSendFromISR()
1278 … if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) in xQueueGenericSendFromISR()
1310 prvIncrementQueueTxLock( pxQueue, cTxLock ); in xQueueGenericSendFromISR()
1317 traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); in xQueueGenericSendFromISR()
1334 Queue_t * const pxQueue = xQueue; in xQueueGiveFromISR() local
1344 configASSERT( pxQueue ); in xQueueGiveFromISR()
1348 configASSERT( pxQueue->uxItemSize == 0 ); in xQueueGiveFromISR()
1353 …configASSERT( !( ( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) && ( pxQueue->u.xSemaphore.xMutex… in xQueueGiveFromISR()
1376 const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; in xQueueGiveFromISR()
1381 if( uxMessagesWaiting < pxQueue->uxLength ) in xQueueGiveFromISR()
1383 const int8_t cTxLock = pxQueue->cTxLock; in xQueueGiveFromISR()
1385 traceQUEUE_SEND_FROM_ISR( pxQueue ); in xQueueGiveFromISR()
1393 pxQueue->uxMessagesWaiting = ( UBaseType_t ) ( uxMessagesWaiting + ( UBaseType_t ) 1 ); in xQueueGiveFromISR()
1401 if( pxQueue->pxQueueSetContainer != NULL ) in xQueueGiveFromISR()
1403 if( prvNotifyQueueSetContainer( pxQueue ) != pdFALSE ) in xQueueGiveFromISR()
1424 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) in xQueueGiveFromISR()
1426 … if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) in xQueueGiveFromISR()
1452 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) in xQueueGiveFromISR()
1454 … if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) in xQueueGiveFromISR()
1483 prvIncrementQueueTxLock( pxQueue, cTxLock ); in xQueueGiveFromISR()
1490 traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); in xQueueGiveFromISR()
1508 Queue_t * const pxQueue = xQueue; in xQueueReceive() local
1513 configASSERT( ( pxQueue ) ); in xQueueReceive()
1517 …configASSERT( !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) ); in xQueueReceive()
1530 const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; in xQueueReceive()
1537 prvCopyDataFromQueue( pxQueue, pvBuffer ); in xQueueReceive()
1538 traceQUEUE_RECEIVE( pxQueue ); in xQueueReceive()
1539 … pxQueue->uxMessagesWaiting = ( UBaseType_t ) ( uxMessagesWaiting - ( UBaseType_t ) 1 ); in xQueueReceive()
1544 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) in xQueueReceive()
1546 if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) in xQueueReceive()
1574 traceQUEUE_RECEIVE_FAILED( pxQueue ); in xQueueReceive()
1599 prvLockQueue( pxQueue ); in xQueueReceive()
1606 if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) in xQueueReceive()
1608 traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); in xQueueReceive()
1609 vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); in xQueueReceive()
1610 prvUnlockQueue( pxQueue ); in xQueueReceive()
1625 prvUnlockQueue( pxQueue ); in xQueueReceive()
1633 prvUnlockQueue( pxQueue ); in xQueueReceive()
1636 if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) in xQueueReceive()
1638 traceQUEUE_RECEIVE_FAILED( pxQueue ); in xQueueReceive()
1657 Queue_t * const pxQueue = xQueue; in xQueueSemaphoreTake() local
1666 configASSERT( ( pxQueue ) ); in xQueueSemaphoreTake()
1670 configASSERT( pxQueue->uxItemSize == 0 ); in xQueueSemaphoreTake()
1685 const UBaseType_t uxSemaphoreCount = pxQueue->uxMessagesWaiting; in xQueueSemaphoreTake()
1691 traceQUEUE_RECEIVE( pxQueue ); in xQueueSemaphoreTake()
1695 … pxQueue->uxMessagesWaiting = ( UBaseType_t ) ( uxSemaphoreCount - ( UBaseType_t ) 1 ); in xQueueSemaphoreTake()
1699 if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) in xQueueSemaphoreTake()
1703 pxQueue->u.xSemaphore.xMutexHolder = pvTaskIncrementMutexHeldCount(); in xQueueSemaphoreTake()
1714 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) in xQueueSemaphoreTake()
1716 if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) in xQueueSemaphoreTake()
1744 traceQUEUE_RECEIVE_FAILED( pxQueue ); in xQueueSemaphoreTake()
1769 prvLockQueue( pxQueue ); in xQueueSemaphoreTake()
1778 if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) in xQueueSemaphoreTake()
1780 traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); in xQueueSemaphoreTake()
1784 if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) in xQueueSemaphoreTake()
1788 … xInheritanceOccurred = xTaskPriorityInherit( pxQueue->u.xSemaphore.xMutexHolder ); in xQueueSemaphoreTake()
1799 vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); in xQueueSemaphoreTake()
1800 prvUnlockQueue( pxQueue ); in xQueueSemaphoreTake()
1815 prvUnlockQueue( pxQueue ); in xQueueSemaphoreTake()
1822 prvUnlockQueue( pxQueue ); in xQueueSemaphoreTake()
1829 if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) in xQueueSemaphoreTake()
1847 … uxHighestWaitingPriority = prvGetDisinheritPriorityAfterTimeout( pxQueue ); in xQueueSemaphoreTake()
1856 …vTaskPriorityDisinheritAfterTimeout( pxQueue->u.xSemaphore.xMutexHolder, uxHighestWaitingPriority … in xQueueSemaphoreTake()
1863 traceQUEUE_RECEIVE_FAILED( pxQueue ); in xQueueSemaphoreTake()
1884 Queue_t * const pxQueue = xQueue; in xQueuePeek() local
1889 configASSERT( ( pxQueue ) ); in xQueuePeek()
1893 …configASSERT( !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) ); in xQueuePeek()
1906 const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; in xQueuePeek()
1915 pcOriginalReadPosition = pxQueue->u.xQueue.pcReadFrom; in xQueuePeek()
1917 prvCopyDataFromQueue( pxQueue, pvBuffer ); in xQueuePeek()
1918 traceQUEUE_PEEK( pxQueue ); in xQueuePeek()
1921 pxQueue->u.xQueue.pcReadFrom = pcOriginalReadPosition; in xQueuePeek()
1925 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) in xQueuePeek()
1927 … if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) in xQueuePeek()
1956 traceQUEUE_PEEK_FAILED( pxQueue ); in xQueuePeek()
1982 prvLockQueue( pxQueue ); in xQueuePeek()
1989 if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) in xQueuePeek()
1991 traceBLOCKING_ON_QUEUE_PEEK( pxQueue ); in xQueuePeek()
1992 vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); in xQueuePeek()
1993 prvUnlockQueue( pxQueue ); in xQueuePeek()
2008 prvUnlockQueue( pxQueue ); in xQueuePeek()
2016 prvUnlockQueue( pxQueue ); in xQueuePeek()
2019 if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) in xQueuePeek()
2021 traceQUEUE_PEEK_FAILED( pxQueue ); in xQueuePeek()
2041 Queue_t * const pxQueue = xQueue; in xQueueReceiveFromISR() local
2045 configASSERT( pxQueue ); in xQueueReceiveFromISR()
2046 configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); in xQueueReceiveFromISR()
2069 const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; in xQueueReceiveFromISR()
2074 const int8_t cRxLock = pxQueue->cRxLock; in xQueueReceiveFromISR()
2076 traceQUEUE_RECEIVE_FROM_ISR( pxQueue ); in xQueueReceiveFromISR()
2078 prvCopyDataFromQueue( pxQueue, pvBuffer ); in xQueueReceiveFromISR()
2079 pxQueue->uxMessagesWaiting = ( UBaseType_t ) ( uxMessagesWaiting - ( UBaseType_t ) 1 ); in xQueueReceiveFromISR()
2087 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) in xQueueReceiveFromISR()
2089 if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) in xQueueReceiveFromISR()
2116 prvIncrementQueueRxLock( pxQueue, cRxLock ); in xQueueReceiveFromISR()
2124 traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ); in xQueueReceiveFromISR()
2141 Queue_t * const pxQueue = xQueue; in xQueuePeekFromISR() local
2145 configASSERT( pxQueue ); in xQueuePeekFromISR()
2146 configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); in xQueuePeekFromISR()
2147 configASSERT( pxQueue->uxItemSize != 0 ); /* Can't peek a semaphore. */ in xQueuePeekFromISR()
2171 if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) in xQueuePeekFromISR()
2173 traceQUEUE_PEEK_FROM_ISR( pxQueue ); in xQueuePeekFromISR()
2177 pcOriginalReadPosition = pxQueue->u.xQueue.pcReadFrom; in xQueuePeekFromISR()
2178 prvCopyDataFromQueue( pxQueue, pvBuffer ); in xQueuePeekFromISR()
2179 pxQueue->u.xQueue.pcReadFrom = pcOriginalReadPosition; in xQueuePeekFromISR()
2186 traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue ); in xQueuePeekFromISR()
2220 Queue_t * const pxQueue = xQueue; in uxQueueSpacesAvailable() local
2224 configASSERT( pxQueue ); in uxQueueSpacesAvailable()
2228 uxReturn = ( UBaseType_t ) ( pxQueue->uxLength - pxQueue->uxMessagesWaiting ); in uxQueueSpacesAvailable()
2241 Queue_t * const pxQueue = xQueue; in uxQueueMessagesWaitingFromISR() local
2245 configASSERT( pxQueue ); in uxQueueMessagesWaitingFromISR()
2246 uxReturn = pxQueue->uxMessagesWaiting; in uxQueueMessagesWaitingFromISR()
2256 Queue_t * const pxQueue = xQueue; in vQueueDelete() local
2260 configASSERT( pxQueue ); in vQueueDelete()
2261 traceQUEUE_DELETE( pxQueue ); in vQueueDelete()
2265 vQueueUnregisterQueue( pxQueue ); in vQueueDelete()
2273 vPortFree( pxQueue ); in vQueueDelete()
2279 if( pxQueue->ucStaticallyAllocated == ( uint8_t ) pdFALSE ) in vQueueDelete()
2281 vPortFree( pxQueue ); in vQueueDelete()
2292 ( void ) pxQueue; in vQueueDelete()
2365 static UBaseType_t prvGetDisinheritPriorityAfterTimeout( const Queue_t * const pxQueue ) in prvGetDisinheritPriorityAfterTimeout() argument
2375 if( listCURRENT_LIST_LENGTH( &( pxQueue->xTasksWaitingToReceive ) ) > 0U ) in prvGetDisinheritPriorityAfterTimeout()
2377 …figMAX_PRIORITIES - ( UBaseType_t ) listGET_ITEM_VALUE_OF_HEAD_ENTRY( &( pxQueue->xTasksWaitingToR… in prvGetDisinheritPriorityAfterTimeout()
2390 static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, in prvCopyDataToQueue() argument
2399 uxMessagesWaiting = pxQueue->uxMessagesWaiting; in prvCopyDataToQueue()
2401 if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) in prvCopyDataToQueue()
2405 if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) in prvCopyDataToQueue()
2408 xReturn = xTaskPriorityDisinherit( pxQueue->u.xSemaphore.xMutexHolder ); in prvCopyDataToQueue()
2409 pxQueue->u.xSemaphore.xMutexHolder = NULL; in prvCopyDataToQueue()
2420 … ( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); in prvCopyDataToQueue()
2421 pxQueue->pcWriteTo += pxQueue->uxItemSize; in prvCopyDataToQueue()
2423 if( pxQueue->pcWriteTo >= pxQueue->u.xQueue.pcTail ) in prvCopyDataToQueue()
2425 pxQueue->pcWriteTo = pxQueue->pcHead; in prvCopyDataToQueue()
2434 …( void ) memcpy( ( void * ) pxQueue->u.xQueue.pcReadFrom, pvItemToQueue, ( size_t ) pxQueue->uxIte… in prvCopyDataToQueue()
2435 pxQueue->u.xQueue.pcReadFrom -= pxQueue->uxItemSize; in prvCopyDataToQueue()
2437 if( pxQueue->u.xQueue.pcReadFrom < pxQueue->pcHead ) in prvCopyDataToQueue()
2439 pxQueue->u.xQueue.pcReadFrom = ( pxQueue->u.xQueue.pcTail - pxQueue->uxItemSize ); in prvCopyDataToQueue()
2467 pxQueue->uxMessagesWaiting = ( UBaseType_t ) ( uxMessagesWaiting + ( UBaseType_t ) 1 ); in prvCopyDataToQueue()
2473 static void prvCopyDataFromQueue( Queue_t * const pxQueue, in prvCopyDataFromQueue() argument
2476 if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) in prvCopyDataFromQueue()
2478 pxQueue->u.xQueue.pcReadFrom += pxQueue->uxItemSize; in prvCopyDataFromQueue()
2480 if( pxQueue->u.xQueue.pcReadFrom >= pxQueue->u.xQueue.pcTail ) in prvCopyDataFromQueue()
2482 pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead; in prvCopyDataFromQueue()
2489 …( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( size_t ) pxQueue-… in prvCopyDataFromQueue()
2494 static void prvUnlockQueue( Queue_t * const pxQueue ) in prvUnlockQueue() argument
2504 int8_t cTxLock = pxQueue->cTxLock; in prvUnlockQueue()
2513 if( pxQueue->pxQueueSetContainer != NULL ) in prvUnlockQueue()
2515 if( prvNotifyQueueSetContainer( pxQueue ) != pdFALSE ) in prvUnlockQueue()
2532 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) in prvUnlockQueue()
2534 … if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) in prvUnlockQueue()
2555 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) in prvUnlockQueue()
2557 … if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) in prvUnlockQueue()
2578 pxQueue->cTxLock = queueUNLOCKED; in prvUnlockQueue()
2585 int8_t cRxLock = pxQueue->cRxLock; in prvUnlockQueue()
2589 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) in prvUnlockQueue()
2591 if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) in prvUnlockQueue()
2608 pxQueue->cRxLock = queueUNLOCKED; in prvUnlockQueue()
2614 static BaseType_t prvIsQueueEmpty( const Queue_t * pxQueue ) in prvIsQueueEmpty() argument
2620 if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) in prvIsQueueEmpty()
2638 Queue_t * const pxQueue = xQueue; in xQueueIsQueueEmptyFromISR() local
2642 configASSERT( pxQueue ); in xQueueIsQueueEmptyFromISR()
2644 if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) in xQueueIsQueueEmptyFromISR()
2659 static BaseType_t prvIsQueueFull( const Queue_t * pxQueue ) in prvIsQueueFull() argument
2665 if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) in prvIsQueueFull()
2683 Queue_t * const pxQueue = xQueue; in xQueueIsQueueFullFromISR() local
2687 configASSERT( pxQueue ); in xQueueIsQueueFullFromISR()
2689 if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) in xQueueIsQueueFullFromISR()
2711 Queue_t * const pxQueue = xQueue; in xQueueCRSend() local
2720 if( prvIsQueueFull( pxQueue ) != pdFALSE ) in xQueueCRSend()
2728 vCoRoutineAddToDelayedList( xTicksToWait, &( pxQueue->xTasksWaitingToSend ) ); in xQueueCRSend()
2743 if( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) in xQueueCRSend()
2746 prvCopyDataToQueue( pxQueue, pvItemToQueue, queueSEND_TO_BACK ); in xQueueCRSend()
2750 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) in xQueueCRSend()
2756 … if( xCoRoutineRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) in xQueueCRSend()
2794 Queue_t * const pxQueue = xQueue; in xQueueCRReceive() local
2803 if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) in xQueueCRReceive()
2811 … vCoRoutineAddToDelayedList( xTicksToWait, &( pxQueue->xTasksWaitingToReceive ) ); in xQueueCRReceive()
2830 if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) in xQueueCRReceive()
2833 pxQueue->u.xQueue.pcReadFrom += pxQueue->uxItemSize; in xQueueCRReceive()
2835 if( pxQueue->u.xQueue.pcReadFrom >= pxQueue->u.xQueue.pcTail ) in xQueueCRReceive()
2837 pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead; in xQueueCRReceive()
2844 --( pxQueue->uxMessagesWaiting ); in xQueueCRReceive()
2845 …( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( unsigned ) pxQueu… in xQueueCRReceive()
2850 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) in xQueueCRReceive()
2856 … if( xCoRoutineRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) in xQueueCRReceive()
2891 Queue_t * const pxQueue = xQueue; in xQueueCRSendFromISR() local
2897 if( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) in xQueueCRSendFromISR()
2899 prvCopyDataToQueue( pxQueue, pvItemToQueue, queueSEND_TO_BACK ); in xQueueCRSendFromISR()
2905 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) in xQueueCRSendFromISR()
2907 … if( xCoRoutineRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) in xQueueCRSendFromISR()
2946 Queue_t * const pxQueue = xQueue; in xQueueCRReceiveFromISR() local
2952 if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) in xQueueCRReceiveFromISR()
2955 pxQueue->u.xQueue.pcReadFrom += pxQueue->uxItemSize; in xQueueCRReceiveFromISR()
2957 if( pxQueue->u.xQueue.pcReadFrom >= pxQueue->u.xQueue.pcTail ) in xQueueCRReceiveFromISR()
2959 pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead; in xQueueCRReceiveFromISR()
2966 --( pxQueue->uxMessagesWaiting ); in xQueueCRReceiveFromISR()
2967 …( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( unsigned ) pxQueu… in xQueueCRReceiveFromISR()
2971 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) in xQueueCRReceiveFromISR()
2973 … if( xCoRoutineRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) in xQueueCRReceiveFromISR()
3136 Queue_t * const pxQueue = xQueue; in vQueueWaitForMessageRestricted() local
3154 prvLockQueue( pxQueue ); in vQueueWaitForMessageRestricted()
3156 if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U ) in vQueueWaitForMessageRestricted()
3159 …vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait, xWaitIndefini… in vQueueWaitForMessageRestricted()
3166 prvUnlockQueue( pxQueue ); in vQueueWaitForMessageRestricted()
3178 QueueSetHandle_t pxQueue; in xQueueCreateSet() local
3182 …pxQueue = xQueueGenericCreate( uxEventQueueLength, ( UBaseType_t ) sizeof( Queue_t * ), queueQUEUE… in xQueueCreateSet()
3184 traceRETURN_xQueueCreateSet( pxQueue ); in xQueueCreateSet()
3186 return pxQueue; in xQueueCreateSet()
3310 static BaseType_t prvNotifyQueueSetContainer( const Queue_t * const pxQueue ) in prvNotifyQueueSetContainer() argument
3312 Queue_t * pxQueueSetContainer = pxQueue->pxQueueSetContainer; in prvNotifyQueueSetContainer()
3330 xReturn = prvCopyDataToQueue( pxQueueSetContainer, &pxQueue, queueSEND_TO_BACK ); in prvNotifyQueueSetContainer()