]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/queue.c
Added portASSERT_IF_INTERRUPT_PRIORITY_INVALID() implementation to Cortex-M3 and...
[freertos] / FreeRTOS / Source / queue.c
index b9024d5354da203f0b1c4920fc1e882846f9f82f..ec665174b5df6cc07657336a091311859a046911 100644 (file)
@@ -940,6 +940,7 @@ xQUEUE *pxQueue;
        configASSERT( pxQueue );\r
        configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( unsigned portBASE_TYPE ) 0U ) ) );\r
        configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );\r
+       portASSERT_IF_INTERRUPT_PRIORITY_INVALID();\r
 \r
        /* Similar to xQueueGenericSend, except we don't block if there is no room\r
        in the queue.  Also we don't directly wake a task that was blocked on a\r
@@ -1050,7 +1051,7 @@ xQUEUE *pxQueue;
                        the highest priority task wanting to access the queue. */\r
                        if( pxQueue->uxMessagesWaiting > ( unsigned portBASE_TYPE ) 0 )\r
                        {\r
-                               /* Remember the read position in case the queue is only being \r
+                               /* Remember the read position in case the queue is only being\r
                                peeked. */\r
                                pcOriginalReadPosition = pxQueue->u.pcReadFrom;\r
 \r
@@ -1188,6 +1189,7 @@ xQUEUE *pxQueue;
        pxQueue = ( xQUEUE * ) xQueue;\r
        configASSERT( pxQueue );\r
        configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( unsigned portBASE_TYPE ) 0U ) ) );\r
+       portASSERT_IF_INTERRUPT_PRIORITY_INVALID();\r
 \r
        uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();\r
        {\r
@@ -1199,9 +1201,9 @@ xQUEUE *pxQueue;
                        prvCopyDataFromQueue( pxQueue, pvBuffer );\r
                        --( pxQueue->uxMessagesWaiting );\r
 \r
-                       /* If the queue is locked the event list will not be modified.  \r
-                       Instead update the lock count so the task that unlocks the queue \r
-                       will know that an ISR has removed data while the queue was \r
+                       /* If the queue is locked the event list will not be modified.\r
+                       Instead update the lock count so the task that unlocks the queue\r
+                       will know that an ISR has removed data while the queue was\r
                        locked. */\r
                        if( pxQueue->xRxLock == queueUNLOCKED )\r
                        {\r
@@ -1249,6 +1251,7 @@ xQUEUE *pxQueue;
        pxQueue = ( xQUEUE * ) xQueue;\r
        configASSERT( pxQueue );\r
        configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( unsigned portBASE_TYPE ) 0U ) ) );\r
+       portASSERT_IF_INTERRUPT_PRIORITY_INVALID();\r
 \r
        uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();\r
        {\r
@@ -1388,9 +1391,9 @@ static void prvCopyDataToQueue( xQUEUE *pxQueue, const void *pvItemToQueue, port
                {\r
                        if( pxQueue->uxMessagesWaiting > 0 )\r
                        {\r
-                               /* An item is not being added but overwritten, so subtract \r
-                               one from the recorded number of items in the queue so when \r
-                               one is added again below the number of recorded items remains \r
+                               /* An item is not being added but overwritten, so subtract\r
+                               one from the recorded number of items in the queue so when\r
+                               one is added again below the number of recorded items remains\r
                                correct. */\r
                                --( pxQueue->uxMessagesWaiting );\r
                        }\r