mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
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:
parent
c0339c2c86
commit
1312fada7c
|
@ -234,6 +234,10 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
|
|||
#define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
|
||||
#endif
|
||||
|
||||
#ifndef portSETUP_TCB
|
||||
#define portSETUP_TCB( pxTCB ) ( void ) pxTCB
|
||||
#endif
|
||||
|
||||
#ifndef configQUEUE_REGISTRY_SIZE
|
||||
#define configQUEUE_REGISTRY_SIZE 0U
|
||||
#endif
|
||||
|
@ -311,6 +315,10 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
|
|||
|
||||
/* The following event macros are embedded in the kernel API calls. */
|
||||
|
||||
#ifndef traceMOVED_TASK_TO_READY_STATE
|
||||
#define traceMOVED_TASK_TO_READY_STATE( pxTCB )
|
||||
#endif
|
||||
|
||||
#ifndef traceQUEUE_CREATE
|
||||
#define traceQUEUE_CREATE( pxNewQueue )
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue