Added traceMOVED_TASK_TO_READY_STATE and portSETUP_TCB macros.

Changed uxTCBNumber back to uxTaskNumber in tasks.c to fix IAR plug-in.
This commit is contained in:
Richard Barry 2012-04-02 20:06:52 +00:00
parent c0339c2c86
commit 1312fada7c
2 changed files with 16 additions and 5 deletions

View file

@ -168,7 +168,7 @@ PRIVILEGED_DATA static volatile unsigned portBASE_TYPE uxSchedulerSuspended =
PRIVILEGED_DATA static volatile unsigned portBASE_TYPE uxMissedTicks = ( unsigned portBASE_TYPE ) 0U;
PRIVILEGED_DATA static volatile portBASE_TYPE xMissedYield = ( portBASE_TYPE ) pdFALSE;
PRIVILEGED_DATA static volatile portBASE_TYPE xNumOfOverflows = ( portBASE_TYPE ) 0;
PRIVILEGED_DATA static unsigned portBASE_TYPE uxTCBNumber = ( unsigned portBASE_TYPE ) 0U;
PRIVILEGED_DATA static unsigned portBASE_TYPE uxTaskNumber = ( unsigned portBASE_TYPE ) 0U;
PRIVILEGED_DATA static portTickType xNextTaskUnblockTime = ( portTickType ) portMAX_DELAY;
#if ( configGENERATE_RUN_TIME_STATS == 1 )
@ -205,6 +205,7 @@ PRIVILEGED_DATA static portTickType xNextTaskUnblockTime = ( portTickType )
* executing task has been rescheduled.
*/
#define prvAddTaskToReadyQueue( pxTCB ) \
traceMOVED_TASK_TO_READY_STATE( pxTCB ) \
if( ( pxTCB )->uxPriority > uxTopReadyPriority ) \
{ \
uxTopReadyPriority = ( pxTCB )->uxPriority; \
@ -506,14 +507,15 @@ tskTCB * pxNewTCB;
#if ( configUSE_TRACE_FACILITY == 1 )
{
/* Add a counter into the TCB for tracing only. */
pxNewTCB->uxTCBNumber = uxTCBNumber;
pxNewTCB->uxTCBNumber = uxTaskNumber;
}
#endif
uxTCBNumber++;
uxTaskNumber++;
prvAddTaskToReadyQueue( pxNewTCB );
xReturn = pdPASS;
portSETUP_TCB( pxNewTCB );
traceTASK_CREATE( pxNewTCB );
}
taskEXIT_CRITICAL();
@ -580,7 +582,7 @@ tskTCB * pxNewTCB;
/* Increment the uxTaskNumberVariable also so kernel aware debuggers
can detect that the task lists need re-generating. */
uxTCBNumber++;
uxTaskNumber++;
traceTASK_DELETE( pxTCB );
}
@ -2300,7 +2302,8 @@ tskTCB *pxNewTCB;
static void prvDeleteTCB( tskTCB *pxTCB )
{
/* This call is required specifically for the TriCore port. It must be
above the vPortFree() calls. */
above the vPortFree() calls. The call is also used by ports/demos that
want to allocate and clean RAM statically. */
portCLEAN_UP_TCB( pxTCB );
/* Free up the memory allocated by the scheduler for the task. It is up to