@@ -3044,6 +3044,19 @@ BaseType_t xReturn;
3044
3044
{
3045
3045
( void ) uxListRemove ( & ( pxUnblockedTCB -> xStateListItem ) );
3046
3046
prvAddTaskToReadyList ( pxUnblockedTCB );
3047
+ #if ( configUSE_TICKLESS_IDLE != 0 )
3048
+ {
3049
+ /* If a task is blocked on a kernel object then xNextTaskUnblockTime
3050
+ might be set to the blocked task's time out time. If the task is
3051
+ unblocked for a reason other than a timeout xNextTaskUnblockTime is
3052
+ normally left unchanged, because it is automatically reset to a new
3053
+ value when the tick count equals xNextTaskUnblockTime. However if
3054
+ tickless idling is used it might be more important to enter sleep mode
3055
+ at the earliest possible time - so reset xNextTaskUnblockTime here to
3056
+ ensure it is updated at the earliest possible time. */
3057
+ prvResetNextTaskUnblockTime ();
3058
+ }
3059
+ #endif
3047
3060
}
3048
3061
else
3049
3062
{
@@ -3068,20 +3081,6 @@ BaseType_t xReturn;
3068
3081
xReturn = pdFALSE ;
3069
3082
}
3070
3083
3071
- #if ( configUSE_TICKLESS_IDLE != 0 )
3072
- {
3073
- /* If a task is blocked on a kernel object then xNextTaskUnblockTime
3074
- might be set to the blocked task's time out time. If the task is
3075
- unblocked for a reason other than a timeout xNextTaskUnblockTime is
3076
- normally left unchanged, because it is automatically reset to a new
3077
- value when the tick count equals xNextTaskUnblockTime. However if
3078
- tickless idling is used it might be more important to enter sleep mode
3079
- at the earliest possible time - so reset xNextTaskUnblockTime here to
3080
- ensure it is updated at the earliest possible time. */
3081
- prvResetNextTaskUnblockTime ();
3082
- }
3083
- #endif
3084
-
3085
3084
return xReturn ;
3086
3085
}
3087
3086
/*-----------------------------------------------------------*/
0 commit comments