]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/queue.c
Introduce vTaskInternalSetTimeOutState() which does not have a critical section,...
[freertos] / FreeRTOS / Source / queue.c
index 9fbe6ba983fe05456d6ae70a71d4f88a0244e2a0..72bdff50835e3df6a84009c4de409561ca8ea5d3 100644 (file)
@@ -891,7 +891,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                {\r
                                        /* The queue was full and a block time was specified so\r
                                        configure the timeout structure. */\r
-                                       vTaskSetTimeOutState( &xTimeOut );\r
+                                       vTaskInternalSetTimeOutState( &xTimeOut );\r
                                        xEntryTimeSet = pdTRUE;\r
                                }\r
                                else\r
@@ -1346,7 +1346,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                {\r
                                        /* The queue was empty and a block time was specified so\r
                                        configure the timeout structure. */\r
-                                       vTaskSetTimeOutState( &xTimeOut );\r
+                                       vTaskInternalSetTimeOutState( &xTimeOut );\r
                                        xEntryTimeSet = pdTRUE;\r
                                }\r
                                else\r
@@ -1502,7 +1502,11 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                        /* For inheritance to have occurred there must have been an\r
                                        initial timeout, and an adjusted timeout cannot become 0, as\r
                                        if it were 0 the function would have exited. */\r
-                                       configASSERT( xInheritanceOccurred == pdFALSE );\r
+                                       #if( configUSE_MUTEXES == 1 )\r
+                                       {\r
+                                               configASSERT( xInheritanceOccurred == pdFALSE );\r
+                                       }\r
+                                       #endif /* configUSE_MUTEXES */\r
 \r
                                        /* The semaphore count was 0 and no block time is specified\r
                                        (or the block time has expired) so exit now. */\r
@@ -1514,7 +1518,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                {\r
                                        /* The semaphore count was 0 and a block time was specified\r
                                        so configure the timeout structure ready to block. */\r
-                                       vTaskSetTimeOutState( &xTimeOut );\r
+                                       vTaskInternalSetTimeOutState( &xTimeOut );\r
                                        xEntryTimeSet = pdTRUE;\r
                                }\r
                                else\r
@@ -1711,7 +1715,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                        /* The queue was empty and a block time was specified so\r
                                        configure the timeout structure ready to enter the blocked\r
                                        state. */\r
-                                       vTaskSetTimeOutState( &xTimeOut );\r
+                                       vTaskInternalSetTimeOutState( &xTimeOut );\r
                                        xEntryTimeSet = pdTRUE;\r
                                }\r
                                else\r