-#if ( ( INCLUDE_vTaskCleanUpResources == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) )\r
-\r
- void vTaskCleanUpResources( void )\r
- {\r
- unsigned short usQueue;\r
- volatile tskTCB *pxTCB;\r
-\r
- usQueue = ( unsigned short ) uxTopUsedPriority + ( unsigned short ) 1;\r
-\r
- /* Remove any TCB's from the ready queues. */\r
- do\r
- {\r
- usQueue--;\r
-\r
- while( !listLIST_IS_EMPTY( &( pxReadyTasksLists[ usQueue ] ) ) )\r
- {\r
- listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &( pxReadyTasksLists[ usQueue ] ) );\r
- vListRemove( ( xListItem * ) &( pxTCB->xGenericListItem ) );\r
-\r
- prvDeleteTCB( ( tskTCB * ) pxTCB );\r
- }\r
- }while( usQueue > ( unsigned short ) tskIDLE_PRIORITY );\r
-\r
- /* Remove any TCB's from the delayed queue. */\r
- while( !listLIST_IS_EMPTY( &xDelayedTaskList1 ) )\r
- {\r
- listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &xDelayedTaskList1 );\r
- vListRemove( ( xListItem * ) &( pxTCB->xGenericListItem ) );\r
-\r
- prvDeleteTCB( ( tskTCB * ) pxTCB );\r
- }\r
-\r
- /* Remove any TCB's from the overflow delayed queue. */\r
- while( !listLIST_IS_EMPTY( &xDelayedTaskList2 ) )\r
- {\r
- listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &xDelayedTaskList2 );\r
- vListRemove( ( xListItem * ) &( pxTCB->xGenericListItem ) );\r
-\r
- prvDeleteTCB( ( tskTCB * ) pxTCB );\r
- }\r
-\r
- while( !listLIST_IS_EMPTY( &xSuspendedTaskList ) )\r
- {\r
- listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &xSuspendedTaskList );\r
- vListRemove( ( xListItem * ) &( pxTCB->xGenericListItem ) );\r
-\r
- prvDeleteTCB( ( tskTCB * ) pxTCB );\r
- }\r
- }\r
-\r
-#endif\r
-/*-----------------------------------------------------------*/\r
-\r