]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/queue.c
Fix a few compiler warnings when compiling the QueueSet.c test code with GCC.
[freertos] / FreeRTOS / Source / queue.c
index 5d6b5aec23919a266c865eee85bcb897b88f8535..2cc676cf73644b55cfa42778491ec0d5c489df67 100644 (file)
@@ -1385,6 +1385,18 @@ static void prvUnlockQueue( xQueueHandle pxQueue )
                                {\r
                                        #if ( configUSE_QUEUE_SETS == 1 )\r
                                        {\r
+                                               /* It is highly unlikely that this code will ever run,\r
+                                               for the following reason:\r
+                                                 + A task will only lock a queue that is part of a\r
+                                                   queue set when it is blocking on a write to the\r
+                                                       queue.\r
+                                                 + An interrupt can only add something to a queue\r
+                                                   while the queue is locked (resulting in the\r
+                                                       following code executing when the queue is unlocked)\r
+                                                       if the queue is not full, meaning a task will never\r
+                                                       have blocked on a write in the first place.\r
+                                                The code could execute if an interrupt is also removing\r
+                                                items from a queue. */\r
                                                if( pxQueue->pxQueueSetContainer != NULL )\r
                                                {\r
                                                        if( prvNotifyQueueSetContainer( pxQueue, queueSEND_TO_BACK ) == pdTRUE )\r