]> git.sur5r.net Git - freertos/commitdiff
Added traceMOVED_TASK_TO_READY_STATE and portSETUP_TCB macros.
authorRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 2 Apr 2012 20:06:52 +0000 (20:06 +0000)
committerRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 2 Apr 2012 20:06:52 +0000 (20:06 +0000)
Changed uxTCBNumber back to uxTaskNumber in tasks.c to fix IAR plug-in.

git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1720 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/include/FreeRTOS.h
Source/tasks.c

index 9aa736a44dd43d3064dbab81425a97fdaf9c02b2..42333497d2c6737ba40bf791f87da3e39cd3065d 100644 (file)
@@ -234,6 +234,10 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
        #define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB\r
 #endif\r
 \r
+#ifndef portSETUP_TCB\r
+       #define portSETUP_TCB( pxTCB ) ( void ) pxTCB\r
+#endif\r
+\r
 #ifndef configQUEUE_REGISTRY_SIZE\r
        #define configQUEUE_REGISTRY_SIZE 0U\r
 #endif\r
@@ -311,6 +315,10 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
 \r
 /* The following event macros are embedded in the kernel API calls. */\r
 \r
+#ifndef traceMOVED_TASK_TO_READY_STATE\r
+       #define traceMOVED_TASK_TO_READY_STATE( pxTCB )\r
+#endif\r
+\r
 #ifndef traceQUEUE_CREATE      \r
        #define traceQUEUE_CREATE( pxNewQueue )\r
 #endif\r
index 2a2e68acb897c44732e93529e8ecbd3fa18bb7bb..4d309ba85bb35d65fad523362735cc26d0e3d003 100644 (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;\r
 PRIVILEGED_DATA static volatile portBASE_TYPE xMissedYield                                             = ( portBASE_TYPE ) pdFALSE;\r
 PRIVILEGED_DATA static volatile portBASE_TYPE xNumOfOverflows                                  = ( portBASE_TYPE ) 0;\r
-PRIVILEGED_DATA static unsigned portBASE_TYPE uxTCBNumber                                              = ( unsigned portBASE_TYPE ) 0U;\r
+PRIVILEGED_DATA static unsigned portBASE_TYPE uxTaskNumber                                             = ( unsigned portBASE_TYPE ) 0U;\r
 PRIVILEGED_DATA static portTickType xNextTaskUnblockTime                                               = ( portTickType ) portMAX_DELAY;\r
 \r
 #if ( configGENERATE_RUN_TIME_STATS == 1 )\r
@@ -205,6 +205,7 @@ PRIVILEGED_DATA static portTickType xNextTaskUnblockTime                                            = ( portTickType )
  * executing task has been rescheduled.\r
  */\r
 #define prvAddTaskToReadyQueue( pxTCB )                                                                                                                                                                        \\r
+       traceMOVED_TASK_TO_READY_STATE( pxTCB )                                                                                                                                                         \\r
        if( ( pxTCB )->uxPriority > uxTopReadyPriority )                                                                                                                                        \\r
        {                                                                                                                                                                                                                                       \\r
                uxTopReadyPriority = ( pxTCB )->uxPriority;                                                                                                                                             \\r
@@ -506,14 +507,15 @@ tskTCB * pxNewTCB;
                        #if ( configUSE_TRACE_FACILITY == 1 )\r
                        {\r
                                /* Add a counter into the TCB for tracing only. */\r
-                               pxNewTCB->uxTCBNumber = uxTCBNumber;\r
+                               pxNewTCB->uxTCBNumber = uxTaskNumber;\r
                        }\r
                        #endif\r
-                       uxTCBNumber++;\r
+                       uxTaskNumber++;\r
 \r
                        prvAddTaskToReadyQueue( pxNewTCB );\r
 \r
                        xReturn = pdPASS;\r
+                       portSETUP_TCB( pxNewTCB );\r
                        traceTASK_CREATE( pxNewTCB );\r
                }\r
                taskEXIT_CRITICAL();\r
@@ -580,7 +582,7 @@ tskTCB * pxNewTCB;
 \r
                        /* Increment the uxTaskNumberVariable also so kernel aware debuggers\r
                        can detect that the task lists need re-generating. */\r
-                       uxTCBNumber++;\r
+                       uxTaskNumber++;\r
 \r
                        traceTASK_DELETE( pxTCB );\r
                }\r
@@ -2300,7 +2302,8 @@ tskTCB *pxNewTCB;
        static void prvDeleteTCB( tskTCB *pxTCB )\r
        {\r
                /* This call is required specifically for the TriCore port.  It must be\r
-               above the vPortFree() calls. */\r
+               above the vPortFree() calls.  The call is also used by ports/demos that\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