]> git.sur5r.net Git - freertos/commitdiff
Correct an err in queue.c introduced when previously updating behaviour when queue...
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 29 Jan 2020 19:52:38 +0000 (19:52 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 29 Jan 2020 19:52:38 +0000 (19:52 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2810 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/.project
FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/main_full.c
FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c
FreeRTOS/Source/queue.c

index 783ec011232fa071f2bd24205acb67179bc99b5a..0d8df7eec60e35bc34f1d8d2514d3200cfee1803 100644 (file)
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597221</id>\r
+                       <id>1580324678127</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597236</id>\r
+                       <id>1580324678132</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597244</id>\r
+                       <id>1580324678137</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597250</id>\r
+                       <id>1580324678144</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597254</id>\r
+                       <id>1580324678149</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597258</id>\r
+                       <id>1580324678155</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597263</id>\r
+                       <id>1580324678160</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597267</id>\r
+                       <id>1580324678165</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597271</id>\r
+                       <id>1580324678171</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597278</id>\r
+                       <id>1580324678176</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597282</id>\r
+                       <id>1580324678196</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597288</id>\r
+                       <id>1580324678207</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597292</id>\r
+                       <id>1580324678218</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597302</id>\r
+                       <id>1580324678227</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597306</id>\r
+                       <id>1580324678238</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597310</id>\r
+                       <id>1580324678249</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597314</id>\r
+                       <id>1580324678260</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597318</id>\r
+                       <id>1580324678271</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597321</id>\r
+                       <id>1580324678282</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597325</id>\r
+                       <id>1580324678293</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597330</id>\r
+                       <id>1580324678305</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597334</id>\r
+                       <id>1580324678315</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                        </matcher>\r
                </filter>\r
                <filter>\r
-                       <id>1528755597338</id>\r
+                       <id>1580324678325</id>\r
                        <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
                        <type>5</type>\r
                        <matcher>\r
                                <arguments>1.0-name-matches-false-false-StreamBufferInterrupt.c</arguments>\r
                        </matcher>\r
                </filter>\r
+               <filter>\r
+                       <id>1580324678334</id>\r
+                       <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-QueueSet.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
                <filter>\r
                        <id>1461598705091</id>\r
                        <name>src/lwIP_Demo/lwip-1.4.0/src/core</name>\r
index 9c13342698e65fcd96b2fad33ac990e2ffe97790..3200bf6a64a795cd1d56a669b84047f4f33eeb87 100644 (file)
 #include "StreamBufferDemo.h"\r
 #include "StreamBufferInterrupt.h"\r
 #include "MessageBufferAMP.h"\r
+#include "QueueSet.h"\r
 \r
 \r
 /* Priorities for the demo application tasks. */\r
@@ -233,6 +234,12 @@ void main_full( void )
        vStartStreamBufferInterruptDemo();\r
        vStartMessageBufferAMPTasks( mainMESSAGE_BUFFER_STACK_SIZE );\r
 \r
+       #if( configUSE_QUEUE_SETS == 1 )\r
+       {\r
+               vStartQueueSetTasks();\r
+       }\r
+       #endif\r
+\r
        /* Start the tasks that implements the command console on the UART, as\r
        described above. */\r
        vUARTCommandConsoleStart( mainUART_COMMAND_CONSOLE_STACK_SIZE, mainUART_COMMAND_CONSOLE_TASK_PRIORITY );\r
@@ -403,17 +410,26 @@ unsigned long ulErrorFound = pdFALSE;
                        ulErrorFound |= 1UL << 20UL;\r
                }\r
 \r
+               #if( configUSE_QUEUE_SETS == 1 )\r
+               {\r
+                       if( xAreQueueSetTasksStillRunning() != pdPASS )\r
+                       {\r
+                               ulErrorFound |= 1UL << 21UL;\r
+                       }\r
+               }\r
+               #endif\r
+\r
                /* Check that the register test 1 task is still running. */\r
                if( ulLastRegTest1Value == ulRegTest1LoopCounter )\r
                {\r
-                       ulErrorFound |= 1UL << 21UL;\r
+                       ulErrorFound |= 1UL << 22UL;\r
                }\r
                ulLastRegTest1Value = ulRegTest1LoopCounter;\r
 \r
                /* Check that the register test 2 task is still running. */\r
                if( ulLastRegTest2Value == ulRegTest2LoopCounter )\r
                {\r
-                       ulErrorFound |= 1UL << 22UL;\r
+                       ulErrorFound |= 1UL << 23UL;\r
                }\r
                ulLastRegTest2Value = ulRegTest2LoopCounter;\r
 \r
index adf6f1d45fa607658dc303c03254e4528f00ec47..22950ff1a8873168a59d844d5459bb57c62bbf9d 100644 (file)
@@ -78,6 +78,7 @@
 #include "IntSemTest.h"\r
 #include "StreamBufferInterrupt.h"\r
 #include "StreamBufferDemo.h"\r
+#include "QueueSet.h"\r
 \r
 /* Xilinx includes. */\r
 #include "platform.h"\r
@@ -303,6 +304,12 @@ void vApplicationTickHook( void )
                a stream being sent from an interrupt to a task. */\r
                vBasicStreamBufferSendFromISR();\r
 \r
+               #if( configUSE_QUEUE_SETS == 1 )\r
+               {\r
+                       vQueueSetAccessQueueSetFromISR();\r
+               }\r
+               #endif\r
+\r
                /* Test flop alignment in interrupts - calling printf from an interrupt\r
                is BAD! */\r
                #if( configASSERT_DEFINED == 1 )\r
index 103718dba86addb6d240b17a2a96dc7e95c4f4ea..eacc69c3fbf075af6d30b36772341d5f439c1dca 100644 (file)
@@ -983,24 +983,23 @@ Queue_t * const pxQueue = xQueue;
                if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )\r
                {\r
                        const int8_t cTxLock = pxQueue->cTxLock;\r
+                       const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting;\r
 \r
                        traceQUEUE_SEND_FROM_ISR( pxQueue );\r
 \r
+                       /* Semaphores use xQueueGiveFromISR(), so pxQueue will not be a\r
+                       semaphore or mutex.  That means prvCopyDataToQueue() cannot result\r
+                       in a task disinheriting a priority and prvCopyDataToQueue() can be\r
+                       called here even though the disinherit function does not check if\r
+                       the scheduler is suspended before accessing the ready lists. */\r
+                       ( void ) prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );\r
+\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( cTxLock == queueUNLOCKED )\r
                        {\r
                                #if ( configUSE_QUEUE_SETS == 1 )\r
                                {\r
-                                       const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting;\r
-\r
-                                       /* Semaphores use xQueueGiveFromISR(), so pxQueue will not be a\r
-                                       semaphore or mutex.  That means prvCopyDataToQueue() cannot result\r
-                                       in a task disinheriting a priority and prvCopyDataToQueue() can be\r
-                                       called here even though the disinherit function does not check if\r
-                                       the scheduler is suspended before accessing the ready lists. */\r
-                                       ( void ) prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );\r
-\r
                                        if( pxQueue->pxQueueSetContainer != NULL )\r
                                        {\r
                                                if( ( xCopyPosition == queueOVERWRITE ) && ( uxPreviousMessagesWaiting != ( UBaseType_t ) 0 ) )\r
@@ -1059,13 +1058,6 @@ Queue_t * const pxQueue = xQueue;
                                }\r
                                #else /* configUSE_QUEUE_SETS */\r
                                {\r
-                                       /* Semaphores use xQueueGiveFromISR(), so pxQueue will not be a\r
-                                       semaphore or mutex.  That means prvCopyDataToQueue() cannot result\r
-                                       in a task disinheriting a priority and prvCopyDataToQueue() can be\r
-                                       called here even though the disinherit function does not check if\r
-                                       the scheduler is suspended before accessing the ready lists. */\r
-                                       ( void ) prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );\r
-\r
                                        if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )\r
                                        {\r
                                                if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )\r
@@ -1090,6 +1082,9 @@ Queue_t * const pxQueue = xQueue;
                                        {\r
                                                mtCOVERAGE_TEST_MARKER();\r
                                        }\r
+                                       \r
+                                       /* Not used in this path. */\r
+                                       ( void ) uxPreviousMessagesWaiting;\r
                                }\r
                                #endif /* configUSE_QUEUE_SETS */\r
                        }\r