-/*\r
- * Macro that looks at the list of tasks that are currently delayed to see if\r
- * any require waking.\r
- *\r
- * Tasks are stored in the queue in the order of their wake time - meaning\r
- * once one tasks has been found whose timer has not expired we need not look\r
- * any further down the list.\r
- */\r
-#define prvCheckDelayedTasks() \\r
-{ \\r
-portTickType xItemValue; \\r
- \\r
- /* Is the tick count greater than or equal to the wake time of the first \\r
- task referenced from the delayed tasks list? */ \\r
- if( xTickCount >= xNextTaskUnblockTime ) \\r
- { \\r
- for( ;; ) \\r
- { \\r
- if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) \\r
- { \\r
- /* The delayed list is empty. Set xNextTaskUnblockTime to the \\r
- maximum possible value so it is extremely unlikely that the \\r
- if( xTickCount >= xNextTaskUnblockTime ) test will pass next \\r
- time through. */ \\r
- xNextTaskUnblockTime = portMAX_DELAY; \\r
- break; \\r
- } \\r
- else \\r
- { \\r
- /* The delayed list is not empty, get the value of the item at \\r
- the head of the delayed list. This is the time at which the \\r
- task at the head of the delayed list should be removed from \\r
- the Blocked state. */ \\r
- pxTCB = ( tskTCB * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); \\r
- xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xGenericListItem ) ); \\r
- \\r
- if( xTickCount < xItemValue ) \\r
- { \\r
- /* It is not time to unblock this item yet, but the item \\r
- value is the time at which the task at the head of the \\r
- blocked list should be removed from the Blocked state - \\r
- so record the item value in xNextTaskUnblockTime. */ \\r
- xNextTaskUnblockTime = xItemValue; \\r
- break; \\r
- } \\r
- \\r
- /* It is time to remove the item from the Blocked state. */ \\r
- uxListRemove( &( pxTCB->xGenericListItem ) ); \\r
- \\r
- /* Is the task waiting on an event also? */ \\r
- if( pxTCB->xEventListItem.pvContainer != NULL ) \\r
- { \\r
- uxListRemove( &( pxTCB->xEventListItem ) ); \\r
- } \\r
- prvAddTaskToReadyQueue( pxTCB ); \\r
- } \\r
- } \\r
- } \\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r