]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/include/FreeRTOS.h
Prepare for V9.0.0 release.
[freertos] / FreeRTOS / Source / include / FreeRTOS.h
index 3ea860df13ca7c9f2e991d96614d9dfeb14ac0eb..e87484350930fb0ff46ac182ddffe64e2b5ae62e 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V9.0.0rc1 - Copyright (C) 2016 Real Time Engineers Ltd.\r
+    FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
@@ -103,6 +103,15 @@ extern "C" {
 /* Definitions specific to the port being used. */\r
 #include "portable.h"\r
 \r
+/* Must be defaulted before configUSE_NEWLIB_REENTRANT is used below. */\r
+#ifndef configUSE_NEWLIB_REENTRANT\r
+       #define configUSE_NEWLIB_REENTRANT 0\r
+#endif\r
+\r
+/* Required if struct _reent is used. */\r
+#if ( configUSE_NEWLIB_REENTRANT == 1 )\r
+       #include <reent.h>\r
+#endif\r
 /*\r
  * Check all the required application specific macros have been defined.\r
  * These macros are application specific and (as downloaded) are defined\r
@@ -173,10 +182,6 @@ extern "C" {
        #define INCLUDE_xTaskAbortDelay 0\r
 #endif\r
 \r
-#ifndef INCLUDE_xTimerGetTimerDaemonTaskHandle\r
-       #define INCLUDE_xTimerGetTimerDaemonTaskHandle 0\r
-#endif\r
-\r
 #ifndef INCLUDE_xQueueGetMutexHolder\r
        #define INCLUDE_xQueueGetMutexHolder 0\r
 #endif\r
@@ -185,12 +190,8 @@ extern "C" {
        #define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder\r
 #endif\r
 \r
-#ifndef INCLUDE_pcTaskGetTaskName\r
-       #define INCLUDE_pcTaskGetTaskName 0\r
-#endif\r
-\r
-#ifndef INCLUDE_xTaskGetTaskHandle\r
-       #define INCLUDE_xTaskGetTaskHandle 0\r
+#ifndef INCLUDE_xTaskGetHandle\r
+       #define INCLUDE_xTaskGetHandle 0\r
 #endif\r
 \r
 #ifndef INCLUDE_uxTaskGetStackHighWaterMark\r
@@ -322,7 +323,7 @@ extern "C" {
 #if ( configQUEUE_REGISTRY_SIZE < 1 )\r
        #define vQueueAddToRegistry( xQueue, pcName )\r
        #define vQueueUnregisterQueue( xQueue )\r
-       #define pcQueueGetQueueName( xQueue )\r
+       #define pcQueueGetName( xQueue )\r
 #endif\r
 \r
 #ifndef portPOINTER_SIZE_TYPE\r
@@ -691,14 +692,6 @@ extern "C" {
        #define portYIELD_WITHIN_API portYIELD\r
 #endif\r
 \r
-#ifndef pvPortMallocAligned\r
-       #define pvPortMallocAligned( x, puxPreallocatedBuffer ) ( ( ( puxPreallocatedBuffer ) == NULL ) ? ( pvPortMalloc( ( x ) ) ) : ( puxPreallocatedBuffer ) )\r
-#endif\r
-\r
-#ifndef vPortFreeAligned\r
-       #define vPortFreeAligned( pvBlockToFree ) vPortFree( pvBlockToFree )\r
-#endif\r
-\r
 #ifndef portSUPPRESS_TICKS_AND_SLEEP\r
        #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime )\r
 #endif\r
@@ -739,10 +732,6 @@ extern "C" {
        #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0\r
 #endif\r
 \r
-#ifndef configUSE_NEWLIB_REENTRANT\r
-       #define configUSE_NEWLIB_REENTRANT 0\r
-#endif\r
-\r
 #ifndef configUSE_STATS_FORMATTING_FUNCTIONS\r
        #define configUSE_STATS_FORMATTING_FUNCTIONS 0\r
 #endif\r
@@ -784,9 +773,26 @@ extern "C" {
 #endif\r
 \r
 #ifndef configSUPPORT_STATIC_ALLOCATION\r
+       /* Defaults to 0 for backward compatibility. */\r
        #define configSUPPORT_STATIC_ALLOCATION 0\r
 #endif\r
 \r
+#ifndef configSUPPORT_DYNAMIC_ALLOCATION\r
+       /* Defaults to 1 for backward compatibility. */\r
+       #define configSUPPORT_DYNAMIC_ALLOCATION 1\r
+#endif\r
+\r
+/* Sanity check the configuration. */\r
+#if( configUSE_TICKLESS_IDLE != 0 )\r
+       #if( INCLUDE_vTaskSuspend != 1 )\r
+               #error INCLUDE_vTaskSuspend must be set to 1 if configUSE_TICKLESS_IDLE is not set to 0\r
+       #endif /* INCLUDE_vTaskSuspend */\r
+#endif /* configUSE_TICKLESS_IDLE */\r
+\r
+#if( ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) )\r
+       #error configSUPPORT_STATIC_ALLOCATION and configSUPPORT_DYNAMIC_ALLOCATION cannot both be 0, but can both be 1.\r
+#endif\r
+\r
 #if( ( configUSE_RECURSIVE_MUTEXES == 1 ) && ( configUSE_MUTEXES != 1 ) )\r
        #error configUSE_MUTEXES must be set to 1 to use recursive mutexes\r
 #endif\r
@@ -830,6 +836,10 @@ V8 if desired. */
        #define xCoRoutineHandle CoRoutineHandle_t\r
        #define pdTASK_HOOK_CODE TaskHookFunction_t\r
        #define portTICK_RATE_MS portTICK_PERIOD_MS\r
+       #define pcTaskGetTaskName pcTaskGetName\r
+       #define pcTimerGetTimerName pcTimerGetName\r
+       #define pcQueueGetQueueName pcQueueGetName\r
+       #define vTaskGetTaskInfo vTaskGetInfo\r
 \r
        /* Backward compatibility within the scheduler code only - these definitions\r
        are not really required but are included for completeness. */\r
@@ -935,7 +945,7 @@ typedef struct xSTATIC_TCB
                uint32_t                ulDummy18;\r
                uint8_t                 ucDummy19;\r
        #endif\r
-       #if ( configSUPPORT_STATIC_ALLOCATION == 1 )\r
+       #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )\r
                uint8_t                 uxDummy20;\r
        #endif\r
 \r
@@ -966,19 +976,20 @@ typedef struct xSTATIC_QUEUE
        } u;\r
 \r
        StaticList_t xDummy3[ 2 ];\r
-       UBaseType_t uxDummy4[ 5 ];\r
+       UBaseType_t uxDummy4[ 3 ];\r
+       uint8_t ucDummy5[ 2 ];\r
+\r
+       #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )\r
+               uint8_t ucDummy6;\r
+       #endif\r
 \r
        #if ( configUSE_QUEUE_SETS == 1 )\r
                void *pvDummy7;\r
        #endif\r
 \r
        #if ( configUSE_TRACE_FACILITY == 1 )\r
-               UBaseType_t uxDummy5;\r
-               uint8_t ucDummy6;\r
-       #endif\r
-\r
-       #if ( configSUPPORT_STATIC_ALLOCATION == 1 )\r
-                       uint8_t ucDummy7;\r
+               UBaseType_t uxDummy8;\r
+               uint8_t ucDummy9;\r
        #endif\r
 \r
 } StaticQueue_t;\r
@@ -1007,8 +1018,8 @@ typedef struct xSTATIC_EVENT_GROUP
                UBaseType_t uxDummy3;\r
        #endif\r
 \r
-       #if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
-                       uint8_t ucStaticallyAllocated;\r
+       #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )\r
+                       uint8_t ucDummy4;\r
        #endif\r
 \r
 } StaticEventGroup_t;\r
@@ -1038,8 +1049,8 @@ typedef struct xSTATIC_TIMER
                UBaseType_t             uxDummy6;\r
        #endif\r
 \r
-       #if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
-               uint8_t                 ucStaticallyAllocated;\r
+       #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )\r
+               uint8_t                 ucDummy7;\r
        #endif\r
 \r
 } StaticTimer_t;\r