{\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
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