Added uxTaskGetStackHighWaterMark2(), which is the same as uxTaskGetStackHighWaterMark() other than the return type.
Allows the task name parameter passed into xTaskCreate() to be NULL.
This commit is contained in:
@ -114,6 +114,7 @@ to exclude the API function. */
|
||||
#define INCLUDE_xTaskGetSchedulerState 1
|
||||
#define INCLUDE_xTaskGetIdleTaskHandle 1
|
||||
#define INCLUDE_uxTaskGetStackHighWaterMark 1
|
||||
#define INCLUDE_uxTaskGetStackHighWaterMark2 1
|
||||
|
||||
/* Cortex-M specific definitions. */
|
||||
#ifdef __NVIC_PRIO_BITS
|
||||
|
@ -178,7 +178,7 @@
|
||||
<DebugFlag>
|
||||
<trace>0</trace>
|
||||
<periodic>1</periodic>
|
||||
<aLwin>1</aLwin>
|
||||
<aLwin>0</aLwin>
|
||||
<aCover>0</aCover>
|
||||
<aSer1>0</aSer1>
|
||||
<aSer2>0</aSer2>
|
||||
|
@ -766,6 +766,7 @@ static void prvTaskToDelete( void *pvParameters )
|
||||
|
||||
/* For code coverage test purposes it is deleted by the Idle task. */
|
||||
configASSERT( uxTaskGetStackHighWaterMark( NULL ) > 0 );
|
||||
configASSERT( uxTaskGetStackHighWaterMark2( NULL ) > 0 );
|
||||
vTaskSuspend( NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
@ -1057,7 +1058,7 @@ void vApplicationMallocFailedHook( void )
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvTimerCallback( TaskHandle_t xExpiredTimer )
|
||||
static void prvTimerCallback( TimerHandle_t xExpiredTimer )
|
||||
{
|
||||
uint32_t ulCount;
|
||||
|
||||
|
@ -729,7 +729,9 @@ TaskHandle_t xCreatedTask;
|
||||
|
||||
/* The variable that will hold the TCB of tasks created by this function. See
|
||||
the comments above the declaration of the xCreatorTaskTCBBuffer variable for
|
||||
more information. */
|
||||
more information. NOTE: This is not static so relies on the tasks that use it
|
||||
being deleted before this function returns and deallocates its stack. That will
|
||||
only be the case if configUSE_PREEMPTION is set to 1. */
|
||||
StaticTask_t xTCBBuffer;
|
||||
|
||||
/* This buffer that will be used as the stack of tasks created by this function.
|
||||
|
@ -104,6 +104,7 @@ functions anyway. */
|
||||
#define INCLUDE_vTaskDelayUntil 1
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
#define INCLUDE_uxTaskGetStackHighWaterMark 1
|
||||
#define INCLUDE_uxTaskGetStackHighWaterMark2 1
|
||||
#define INCLUDE_xTaskGetSchedulerState 1
|
||||
#define INCLUDE_xTimerGetTimerDaemonTaskHandle 1
|
||||
#define INCLUDE_xTaskGetIdleTaskHandle 1
|
||||
|
@ -381,6 +381,11 @@ const uint32_t ulRunTimeTollerance = ( uint32_t ) 0xfff;
|
||||
xReturn = pdFAIL;
|
||||
}
|
||||
|
||||
if( uxTaskGetStackHighWaterMark2( NULL ) != ( configSTACK_DEPTH_TYPE ) xStatus.usStackHighWaterMark )
|
||||
{
|
||||
xReturn = pdFAIL;
|
||||
}
|
||||
|
||||
/* Now obtain a task status without the high water mark but with the state,
|
||||
which in the case of the idle task should be Read. */
|
||||
xTimerTask = xTimerGetTimerDaemonTaskHandle();
|
||||
@ -408,6 +413,10 @@ const uint32_t ulRunTimeTollerance = ( uint32_t ) 0xfff;
|
||||
{
|
||||
xReturn = pdFAIL;
|
||||
}
|
||||
if( uxTaskGetStackHighWaterMark2( xTimerTask ) != ( configSTACK_DEPTH_TYPE ) xStatus.usStackHighWaterMark )
|
||||
{
|
||||
xReturn = pdFAIL;
|
||||
}
|
||||
|
||||
/* Attempting to abort a delay in the idle task should be guaranteed to
|
||||
fail as the idle task should never block. */
|
||||
|
@ -201,7 +201,7 @@ int main_full( void )
|
||||
vStartDynamicPriorityTasks();
|
||||
vStartQueueSetTasks();
|
||||
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );
|
||||
xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvDemoQueueSpaceFunctions, NULL, configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* Name is null for code coverage. */
|
||||
vStartEventGroupTasks();
|
||||
vStartInterruptSemaphoreTasks();
|
||||
vStartQueueSetPollingTask();
|
||||
|
Reference in New Issue
Block a user