struct _reent xNewLib_reent;\r
#endif\r
\r
-} TCB_t;\r
+} tskTCB;\r
+\r
+/* The old tskTCB name is maintained above then typedefed to the new TCB_t name\r
+below to enable the use of older kernel aware debuggers. */\r
+typedef tskTCB TCB_t;\r
\r
/*\r
* Some kernel aware debuggers require the data the debugger needs access to to\r
{\r
/* Reset the next expected unblock time in case it referred to\r
the task that has just been deleted. */\r
- prvResetNextTaskUnblockTime();\r
+ taskENTER_CRITICAL();\r
+ {\r
+ prvResetNextTaskUnblockTime();\r
+ }\r
+ taskEXIT_CRITICAL();\r
}\r
}\r
}\r
/* A task other than the currently running task was suspended,\r
reset the next expected unblock time in case it referred to the\r
task that is now in the Suspended state. */\r
- prvResetNextTaskUnblockTime();\r
+ taskENTER_CRITICAL();\r
+ {\r
+ prvResetNextTaskUnblockTime();\r
+ }\r
+ taskEXIT_CRITICAL();\r
}\r
else\r
{\r
/* Has the task already been resumed from within an ISR? */\r
if( listIS_CONTAINED_WITHIN( &xPendingReadyList, &( pxTCB->xEventListItem ) ) == pdFALSE )\r
{\r
- /* Is it in the suspended list because it is in the Suspended \r
+ /* Is it in the suspended list because it is in the Suspended\r
state, or because is is blocked with no timeout? */\r
if( listIS_CONTAINED_WITHIN( NULL, &( pxTCB->xEventListItem ) ) != pdFALSE )\r
{\r
called from a critical section within an ISR. */\r
\r
/* The event list is sorted in priority order, so the first in the list can\r
- be removed as it is known to be the highest priority. Remove the TCB from \r
+ be removed as it is known to be the highest priority. Remove the TCB from\r
the delayed list, and add it to the ready list.\r
\r
If an event is for a queue that is locked then this function will never\r
want to allocate and clean RAM statically. */\r
portCLEAN_UP_TCB( pxTCB );\r
\r
- /* Free up the memory allocated by the scheduler for the task. It is up to\r
- the task to free any memory allocated at the application level. */\r
+ /* Free up the memory allocated by the scheduler for the task. It is up\r
+ to the task to free any memory allocated at the application level. */\r
+ #if ( configUSE_NEWLIB_REENTRANT == 1 )\r
+ {\r
+ _reclaim_reent( &( pxTCB->xNewLib_reent ) );\r
+ }\r
+ #endif /* configUSE_NEWLIB_REENTRANT */\r
vPortFreeAligned( pxTCB->pxStack );\r
vPortFree( pxTCB );\r
}\r
volatile UBaseType_t uxArraySize, x;\r
uint32_t ulTotalTime, ulStatsAsPercentage;\r
\r
+ #if( configUSE_TRACE_FACILITY != 1 )\r
+ {\r
+ #error configUSE_TRACE_FACILITY must also be set to 1 in FreeRTOSConfig.h to use vTaskGetRunTimeStats().\r
+ }\r
+ #endif\r
+\r
/*\r
* PLEASE NOTE:\r
*\r