diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-02-14 13:36:30 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-02-25 07:15:19 +0100 |
commit | 5180762ccb480e72c0dac5eb3c8c27a2ad62a240 (patch) | |
tree | 484ebfde56a8ab000eaa09c2717388d4b68b1aaa /cpukit/include | |
parent | config: Add _Thread_Idle_stack_size (diff) | |
download | rtems-5180762ccb480e72c0dac5eb3c8c27a2ad62a240.tar.bz2 |
config: Add _Thread_Idle_body
Move the idle thread body configuration constant out of the
configuration table.
Provide a default definition of the idle thread body constant.
Update #3875.
Diffstat (limited to 'cpukit/include')
-rw-r--r-- | cpukit/include/rtems/confdefs.h | 7 | ||||
-rw-r--r-- | cpukit/include/rtems/config.h | 8 | ||||
-rw-r--r-- | cpukit/include/rtems/score/threadidledata.h | 13 |
3 files changed, 18 insertions, 10 deletions
diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h index 442ee7af92..ae1dca11e0 100644 --- a/cpukit/include/rtems/confdefs.h +++ b/cpukit/include/rtems/confdefs.h @@ -1092,10 +1092,12 @@ extern "C" { #ifndef CONFIGURE_IDLE_TASK_BODY #if defined(BSP_IDLE_TASK_BODY) #define CONFIGURE_IDLE_TASK_BODY BSP_IDLE_TASK_BODY - #else - #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body #endif #endif + +#if defined(CONFIGURE_INIT) && defined(CONFIGURE_IDLE_TASK_BODY) +const Thread_Idle_body _Thread_Idle_body = CONFIGURE_IDLE_TASK_BODY; +#endif /**@}*/ /* end of IDLE thread configuration */ /** @@ -2636,7 +2638,6 @@ struct _reent *__getreent(void) */ const rtems_configuration_table Configuration = { CONFIGURE_EXECUTIVE_RAM_SIZE, /* required RTEMS workspace */ - CONFIGURE_IDLE_TASK_BODY, /* user's IDLE task */ #ifdef CONFIGURE_UNIFIED_WORK_AREAS /* true for unified work areas */ true, #else diff --git a/cpukit/include/rtems/config.h b/cpukit/include/rtems/config.h index 62804be41c..017b4ed476 100644 --- a/cpukit/include/rtems/config.h +++ b/cpukit/include/rtems/config.h @@ -87,12 +87,6 @@ typedef struct { */ uintptr_t work_space_size; - /** - * This element points to the BSP's optional idle task which may override - * the default one provided with RTEMS. - */ - void *(*idle_task)( uintptr_t ); - /** * @brief Specifies if a unified work area is used or not. * @@ -155,7 +149,7 @@ uint32_t rtems_configuration_get_maximum_extensions( void ); (_Watchdog_Ticks_per_timeslice) #define rtems_configuration_get_idle_task() \ - (Configuration.idle_task) + (_Thread_Idle_entry) #define rtems_configuration_get_idle_task_stack_size() \ (_Thread_Idle_stack_size) diff --git a/cpukit/include/rtems/score/threadidledata.h b/cpukit/include/rtems/score/threadidledata.h index 0011776ffa..79ac020576 100644 --- a/cpukit/include/rtems/score/threadidledata.h +++ b/cpukit/include/rtems/score/threadidledata.h @@ -56,6 +56,19 @@ extern "C" { */ extern const size_t _Thread_Idle_stack_size; +/** + * @brief The idle thread body type. + */ +typedef void *( *Thread_Idle_body )( uintptr_t ); + +/** + * @brief The idle thread body. + * + * This constant is defined by the application configuration via + * <rtems/confdefs.h>. + */ +extern const Thread_Idle_body _Thread_Idle_body; + /** @} */ #ifdef __cplusplus |