/* A StaticEventGroup_t object must be provided. */\r
configASSERT( pxEventGroupBuffer );\r
\r
+ #if( configASSERT_DEFINED == 1 )\r
+ {\r
+ /* Sanity check that the size of the structure used to declare a\r
+ variable of type StaticEventGroup_t equals the size of the real\r
+ event group structure. */\r
+ volatile size_t xSize = sizeof( StaticEventGroup_t );\r
+ configASSERT( xSize == sizeof( EventGroup_t ) );\r
+ }\r
+ #endif /* configASSERT_DEFINED */\r
+\r
/* The user has provided a statically allocated event group - use it. */\r
pxEventBits = ( EventGroup_t * ) pxEventGroupBuffer; /*lint !e740 EventGroup_t and StaticEventGroup_t are guaranteed to have the same size and alignment requirement - checked by configASSERT(). */\r
\r
tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE is only true if it is possible for a\r
task to be created using either statically or dynamically allocated RAM. Note\r
that if portUSING_MPU_WRAPPERS is 1 then a protected task can be created with\r
-a statically allocated stack and a dynamically allocated TCB. */\r
+a statically allocated stack and a dynamically allocated TCB.\r
+!!!NOTE!!! If the definition of tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE is\r
+changed then the definition of StaticTask_t must also be updated. */\r
#define tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE ( ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) || ( portUSING_MPU_WRAPPERS == 1 ) )\r
#define tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB ( ( uint8_t ) 0 )\r
#define tskSTATICALLY_ALLOCATED_STACK_ONLY ( ( uint8_t ) 1 )\r
\r
/* Callback function prototypes. --------------------------*/\r
#if( configCHECK_FOR_STACK_OVERFLOW > 0 )\r
+\r
extern void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName );\r
+\r
#endif\r
\r
#if( configUSE_TICK_HOOK > 0 )\r
+\r
extern void vApplicationTickHook( void );\r
+\r
#endif\r
\r
#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
+\r
extern void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize );\r
+\r
#endif\r
\r
/* File private functions. --------------------------------*/\r
* is in any other state.\r
*/\r
#if ( INCLUDE_vTaskSuspend == 1 )\r
+\r
static BaseType_t prvTaskIsTaskSuspended( const TaskHandle_t xTask ) PRIVILEGED_FUNCTION;\r
+\r
#endif /* INCLUDE_vTaskSuspend */\r
\r
/*\r
*/\r
static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB ) PRIVILEGED_FUNCTION;\r
\r
+/*\r
+ * freertos_tasks_c_additions_init() should only be called if the user definable\r
+ * macro FREERTOS_TASKS_C_ADDITIONS_INIT() is defined, as that is the only macro\r
+ * called by the function.\r
+ */\r
+#ifdef FREERTOS_TASKS_C_ADDITIONS_INIT\r
+\r
+ static void freertos_tasks_c_additions_init( void ) PRIVILEGED_FUNCTION;\r
+\r
+#endif\r
+\r
/*-----------------------------------------------------------*/\r
\r
#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
configASSERT( puxStackBuffer != NULL );\r
configASSERT( pxTaskBuffer != NULL );\r
\r
+ #if( configASSERT_DEFINED == 1 )\r
+ {\r
+ /* Sanity check that the size of the structure used to declare a\r
+ variable of type StaticTask_t equals the size of the real task\r
+ structure. */\r
+ volatile size_t xSize = sizeof( StaticTask_t );\r
+ configASSERT( xSize == sizeof( TCB_t ) );\r
+ }\r
+ #endif /* configASSERT_DEFINED */\r
+\r
+\r
if( ( pxTaskBuffer != NULL ) && ( puxStackBuffer != NULL ) )\r
{\r
/* The memory used for the task's TCB and stack are passed into this\r
\r
if( xReturn == pdPASS )\r
{\r
+ /* freertos_tasks_c_additions_init() should only be called if the user\r
+ definable macro FREERTOS_TASKS_C_ADDITIONS_INIT() is defined, as that is\r
+ the only macro called by the function. */\r
+ #ifdef FREERTOS_TASKS_C_ADDITIONS_INIT\r
+ {\r
+ freertos_tasks_c_additions_init();\r
+ }\r
+ #endif\r
+\r
/* Interrupts are turned off here, to ensure a tick does not occur\r
before or during the call to xPortStartScheduler(). The stacks of\r
the created tasks contain a status word with interrupts switched on\r