]> git.sur5r.net Git - freertos/commitdiff
Update xTaskRemoveFromEventList() so when tickless idle is used prvResetNextTaskUnblo...
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 5 Nov 2018 19:35:54 +0000 (19:35 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 5 Nov 2018 19:35:54 +0000 (19:35 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2590 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Source/tasks.c

index 75fa4631c67da11771850eac54405294d8eb8490..0c395d79085bb35c076e7c832a4364f344458240 100644 (file)
@@ -3095,6 +3095,20 @@ BaseType_t xReturn;
        {\r
                ( void ) uxListRemove( &( pxUnblockedTCB->xStateListItem ) );\r
                prvAddTaskToReadyList( pxUnblockedTCB );\r
+\r
+               #if( configUSE_TICKLESS_IDLE != 0 )\r
+               {\r
+                       /* If a task is blocked on a kernel object then xNextTaskUnblockTime\r
+                       might be set to the blocked task's time out time.  If the task is\r
+                       unblocked for a reason other than a timeout xNextTaskUnblockTime is\r
+                       normally left unchanged, because it is automatically reset to a new\r
+                       value when the tick count equals xNextTaskUnblockTime.  However if\r
+                       tickless idling is used it might be more important to enter sleep mode\r
+                       at the earliest possible time - so reset xNextTaskUnblockTime here to\r
+                       ensure it is updated at the earliest possible time. */\r
+                       prvResetNextTaskUnblockTime();\r
+               }\r
+               #endif\r
        }\r
        else\r
        {\r
@@ -3119,20 +3133,6 @@ BaseType_t xReturn;
                xReturn = pdFALSE;\r
        }\r
 \r
-       #if( configUSE_TICKLESS_IDLE != 0 )\r
-       {\r
-               /* If a task is blocked on a kernel object then xNextTaskUnblockTime\r
-               might be set to the blocked task's time out time.  If the task is\r
-               unblocked for a reason other than a timeout xNextTaskUnblockTime is\r
-               normally left unchanged, because it is automatically reset to a new\r
-               value when the tick count equals xNextTaskUnblockTime.  However if\r
-               tickless idling is used it might be more important to enter sleep mode\r
-               at the earliest possible time - so reset xNextTaskUnblockTime here to\r
-               ensure it is updated at the earliest possible time. */\r
-               prvResetNextTaskUnblockTime();\r
-       }\r
-       #endif\r
-\r
        return xReturn;\r
 }\r
 /*-----------------------------------------------------------*/\r