]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/tasks.c
Ensure the code builds when configSUPPORT_STATIC_ALLOCATION is 0.
[freertos] / FreeRTOS / Source / tasks.c
index 432d0783c1024d934c76d90f303e6e8ace5b7fa9..d73f8d2770de83410b58974e9685004c387f9d16 100644 (file)
@@ -554,7 +554,7 @@ static void prvResetNextTaskUnblockTime( void );
 #endif\r
 /*-----------------------------------------------------------*/\r
 \r
-BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, StaticTask_t * const pxTCBBuffer, const MemoryRegion_t * const xRegions ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, StaticTask_t * const pxTaskBuffer, const MemoryRegion_t * const xRegions ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
 {\r
 BaseType_t xReturn;\r
 TCB_t * pxNewTCB;\r
@@ -565,7 +565,7 @@ StackType_t *pxTopOfStack;
 \r
        /* Allocate the memory required by the TCB and stack for the new task,\r
        checking that the allocation was successful. */\r
-       pxNewTCB = prvAllocateTCBAndStack( usStackDepth, puxStackBuffer, ( TCB_t* ) pxTCBBuffer ); /*lint !e740 Unusual cast is ok as the structures are designed to have the same alignment, and the size is checked by an assert. */\r
+       pxNewTCB = prvAllocateTCBAndStack( usStackDepth, puxStackBuffer, ( TCB_t* ) pxTaskBuffer ); /*lint !e740 Unusual cast is ok as the structures are designed to have the same alignment, and the size is checked by an assert. */\r
 \r
        if( pxNewTCB != NULL )\r
        {\r
@@ -3145,7 +3145,7 @@ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake )
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static TCB_t *prvAllocateTCBAndStack( const uint16_t usStackDepth, StackType_t * const puxStackBuffer, TCB_t * const pxTCBBuffer )\r
+static TCB_t *prvAllocateTCBAndStack( const uint16_t usStackDepth, StackType_t * const puxStackBuffer, TCB_t * const pxTaskBuffer )\r
 {\r
 TCB_t *pxNewTCB;\r
 \r
@@ -3166,7 +3166,7 @@ TCB_t *pxNewTCB;
        {\r
                /* Allocate space for the TCB.  Where the memory comes from depends on\r
                the implementation of the port malloc function. */\r
-               pxNewTCB = ( TCB_t * ) pvPortMallocAligned( sizeof( TCB_t ), pxTCBBuffer );\r
+               pxNewTCB = ( TCB_t * ) pvPortMallocAligned( sizeof( TCB_t ), pxTaskBuffer );\r
 \r
                if( pxNewTCB != NULL )\r
                {\r
@@ -3179,7 +3179,7 @@ TCB_t *pxNewTCB;
                        {\r
                                /* Could not allocate the stack.  Delete the allocated TCB - if\r
                                it was allocated dynamically. */\r
-                               if( pxTCBBuffer == NULL )\r
+                               if( pxTaskBuffer == NULL )\r
                                {\r
                                        vPortFree( pxNewTCB );\r
                                }\r
@@ -3197,7 +3197,7 @@ TCB_t *pxNewTCB;
                if( pxStack != NULL )\r
                {\r
                        /* Allocate space for the TCB. */\r
-                       pxNewTCB = ( TCB_t * ) pvPortMallocAligned( sizeof( TCB_t ), pxTCBBuffer ); /*lint !e961 MISRA exception as the casts are only redundant for some paths. */\r
+                       pxNewTCB = ( TCB_t * ) pvPortMallocAligned( sizeof( TCB_t ), pxTaskBuffer ); /*lint !e961 MISRA exception as the casts are only redundant for some paths. */\r
 \r
                        if( pxNewTCB != NULL )\r
                        {\r
@@ -3250,7 +3250,7 @@ TCB_t *pxNewTCB;
                                mtCOVERAGE_TEST_MARKER();\r
                        }\r
 \r
-                       if( pxTCBBuffer != NULL )\r
+                       if( pxTaskBuffer != NULL )\r
                        {\r
                                /* The application provided its own TCB.  Note the fact so no\r
                                attempt is made to delete the TCB if the task is deleted. */\r