]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/queue.c
Make xTaskIsTaskSuspended() a private function as it should only be called from withi...
[freertos] / FreeRTOS / Source / queue.c
index 61f907852ecbc40664c01fa2d5c43f38985bad41..6a3acc984ecb94d14b6b448e1c5ac569fefbcde3 100644 (file)
@@ -86,7 +86,7 @@ privileged Vs unprivileged linkage and placement. */
 #undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE /*lint !e961 !e750. */\r
 \r
 \r
-/* Constants used with the cRxLock and xTxLock structure members. */\r
+/* Constants used with the xRxLock and xTxLock structure members. */\r
 #define queueUNLOCKED                                  ( ( BaseType_t ) -1 )\r
 #define queueLOCKED_UNMODIFIED                 ( ( BaseType_t ) 0 )\r
 \r
@@ -1038,11 +1038,11 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
        link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */\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
-       queue read, instead we return a flag to say whether a context switch is\r
-       required or not (i.e. has a task with a higher priority than us been woken\r
-       by this post). */\r
+       /* Similar to xQueueGenericSend, except without blocking if there is no room\r
+       in the queue.  Also don't directly wake a task that was blocked on a queue\r
+       read, instead return a flag to say whether a context switch is required or \r
+       not (i.e. has a task with a higher priority than us been woken by this \r
+       post). */\r
        uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();\r
        {\r
                if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )\r
@@ -1051,7 +1051,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
 \r
                        prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );\r
 \r
-                       /* If the queue is locked we do not alter the event list.  This will\r
+                       /* The event list is not altered if the queue is locked.  This will\r
                        be done when the queue is unlocked later. */\r
                        if( pxQueue->xTxLock == queueUNLOCKED )\r
                        {\r
@@ -2349,6 +2349,8 @@ BaseType_t xReturn;
        Queue_t *pxQueueSetContainer = pxQueue->pxQueueSetContainer;\r
        BaseType_t xReturn = pdFALSE;\r
 \r
+               /* This function must be called form a critical section. */\r
+       \r
                configASSERT( pxQueueSetContainer );\r
                configASSERT( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength );\r
 \r