diff --git a/CHANGELOG.md b/CHANGELOG.md index e22b299eb..ca57cb2ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Development Build: v6.0.0-rc4+dev179 +- Remove obsolete _USING_RTEMS_INCLUDES_ +- Support adding default flags at task creation +- See and + ## Development Build: v6.0.0-rc4+dev173 - Update action versions - add doc-prebuild dependency diff --git a/default_config.cmake b/default_config.cmake index 01fcd4ba8..592e5636a 100644 --- a/default_config.cmake +++ b/default_config.cmake @@ -347,3 +347,14 @@ set(OSAL_CONFIG_MAX_CMD_LEN 1000 set(OSAL_CONFIG_QUEUE_MAX_DEPTH 50 CACHE STRING "Maximum depth of message queue" ) + +# Flags added to all tasks on creation +# +# Some OS's use floating point under the hood, this supports +# adding the floating point flag on creation of all tasks instead of +# just when OS_FP_ENABLED flag is passed in to OS_TaskCreate +# +# Set to 0 to not add any +set(OSAL_CONFIG_ADD_TASK_FLAGS 0 + CACHE STRING "Flags added to all tasks" +) diff --git a/osconfig.h.in b/osconfig.h.in index ff2749d03..ac8cbb954 100644 --- a/osconfig.h.in +++ b/osconfig.h.in @@ -244,6 +244,15 @@ */ #define OS_PRINTF_CONSOLE_NAME "@OSAL_CONFIG_PRINTF_CONSOLE_NAME@" + /** + * \brief Flags added to all tasks on creation + * + * Added to the task flags on creation + * + * Supports adding floating point support for all tasks when the OS requires it + */ +#define OS_ADD_TASK_FLAGS @OSAL_CONFIG_ADD_TASK_FLAGS@ + /* * OSAL fixed resource limits * diff --git a/src/bsp/pc-rtems/src/bsp_start.c b/src/bsp/pc-rtems/src/bsp_start.c index 172748692..acdabe2c3 100644 --- a/src/bsp/pc-rtems/src/bsp_start.c +++ b/src/bsp/pc-rtems/src/bsp_start.c @@ -23,8 +23,6 @@ * OSAL BSP main entry point. */ -#define _USING_RTEMS_INCLUDES_ - /* ** Include Files */ diff --git a/src/os/inc/osapi-version.h b/src/os/inc/osapi-version.h index 4e55f3112..1943f890f 100644 --- a/src/os/inc/osapi-version.h +++ b/src/os/inc/osapi-version.h @@ -34,7 +34,7 @@ /* * Development Build Macro Definitions */ -#define OS_BUILD_NUMBER 173 +#define OS_BUILD_NUMBER 179 #define OS_BUILD_BASELINE "v6.0.0-rc4" /* diff --git a/src/os/rtems/src/os-impl-loader.c b/src/os/rtems/src/os-impl-loader.c index dfb5e9651..2ec9f79b1 100644 --- a/src/os/rtems/src/os-impl-loader.c +++ b/src/os/rtems/src/os-impl-loader.c @@ -26,9 +26,6 @@ /**************************************************************************************** INCLUDE FILES ***************************************************************************************/ - -#define _USING_RTEMS_INCLUDES_ - #include "os-rtems.h" #include "os-impl-loader.h" #include "os-shared-module.h" diff --git a/src/os/rtems/src/os-impl-no-module.c b/src/os/rtems/src/os-impl-no-module.c index 77d6be5e2..f3c6fe5d4 100644 --- a/src/os/rtems/src/os-impl-no-module.c +++ b/src/os/rtems/src/os-impl-no-module.c @@ -26,9 +26,6 @@ /**************************************************************************************** INCLUDE FILES ***************************************************************************************/ - -#define _USING_RTEMS_INCLUDES_ - #include "os-rtems.h" /**************************************************************************************** diff --git a/src/os/rtems/src/os-impl-timebase.c b/src/os/rtems/src/os-impl-timebase.c index b275d7cc5..b24629cdd 100644 --- a/src/os/rtems/src/os-impl-timebase.c +++ b/src/os/rtems/src/os-impl-timebase.c @@ -26,8 +26,6 @@ /**************************************************************************************** INCLUDE FILES ***************************************************************************************/ -#define _USING_RTEMS_INCLUDES_ - #include "os-rtems.h" #include "os-shared-common.h" diff --git a/src/os/shared/src/osapi-task.c b/src/os/shared/src/osapi-task.c index dc3705e0f..22b89512c 100644 --- a/src/os/shared/src/osapi-task.c +++ b/src/os/shared/src/osapi-task.c @@ -192,6 +192,9 @@ int32 OS_TaskCreate(osal_id_t *task_id, const char *task_name, osal_task_entry f task->entry_function_pointer = function_pointer; task->stack_pointer = stack_pointer; + /* Add default flags */ + flags |= OS_ADD_TASK_FLAGS; + /* Now call the OS-specific implementation. This reads info from the task table. */ return_code = OS_TaskCreate_Impl(&token, flags);