summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-14 09:31:44 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-25 07:15:18 +0100
commit9520ec3a2aab575e264410d1ce95c468897c3bc9 (patch)
tree9bf686e89d8a2d23e69f110674a1141a3e7f985c /cpukit/include/rtems
parentconfig: Remove CONFIGURE_HAS_OWN_INIT_TASK_TABLE (diff)
downloadrtems-9520ec3a2aab575e264410d1ce95c468897c3bc9.tar.bz2
config: Simplify initialization task config
With the removal of the CONFIGURE_HAS_OWN_INIT_TASK_TABLE configuration option at most one Classic API user initialization task can be configured. Provide an RTEMS API configuration table for backward compatibility. Update #3873.
Diffstat (limited to 'cpukit/include/rtems')
-rw-r--r--cpukit/include/rtems/confdefs.h59
-rw-r--r--cpukit/include/rtems/config.h3
-rw-r--r--cpukit/include/rtems/rtems/config.h13
-rw-r--r--cpukit/include/rtems/rtems/tasksdata.h19
4 files changed, 24 insertions, 70 deletions
diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h
index b5f8de4cd1..13ba4466f0 100644
--- a/cpukit/include/rtems/confdefs.h
+++ b/cpukit/include/rtems/confdefs.h
@@ -104,11 +104,6 @@ extern "C" {
*/
/**
- * This is the Classic API initialization tasks table.
- */
-extern rtems_initialization_tasks_table Initialization_tasks[];
-
-/**
* This macro determines whether the RTEMS reentrancy support for
* the Newlib C Library is enabled.
*/
@@ -1362,43 +1357,9 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#define CONFIGURE_INIT_TASK_ARGUMENTS 0
#endif
-#ifdef CONFIGURE_INIT
- rtems_initialization_tasks_table Initialization_tasks[] = {
- { CONFIGURE_INIT_TASK_NAME,
- CONFIGURE_INIT_TASK_STACK_SIZE,
- CONFIGURE_INIT_TASK_PRIORITY,
- CONFIGURE_INIT_TASK_ATTRIBUTES,
- CONFIGURE_INIT_TASK_ENTRY_POINT,
- CONFIGURE_INIT_TASK_INITIAL_MODES,
- CONFIGURE_INIT_TASK_ARGUMENTS
- }
- };
-#endif
-
-/**
- * This is the name of the Initialization Tasks Table generated.
- */
-#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
-
-/*
- * This is the size of the Initialization Tasks Table generated.
- */
-#define CONFIGURE_INIT_TASK_TABLE_SIZE \
- RTEMS_ARRAY_SIZE(CONFIGURE_INIT_TASK_TABLE)
-
#else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */
/*
- * This is the name of the Initialization Task when none is configured.
- */
-#define CONFIGURE_INIT_TASK_TABLE NULL
-
-/*
- * This is the size of the Initialization Task when none is configured.
- */
-#define CONFIGURE_INIT_TASK_TABLE_SIZE 0
-
-/*
* This is the stack size of the Initialization Task when none is configured.
*/
#define CONFIGURE_INIT_TASK_STACK_SIZE 0
@@ -2580,14 +2541,6 @@ struct _reent *__getreent(void)
EXTENSION_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_USER_EXTENSIONS );
#endif
- /**
- * This is the Classic API Configuration Table.
- */
- rtems_api_configuration_table Configuration_RTEMS_API = {
- CONFIGURE_INIT_TASK_TABLE_SIZE,
- CONFIGURE_INIT_TASK_TABLE
- };
-
#if CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS > 0
POSIX_Keys_Key_value_pair _POSIX_Keys_Key_value_pairs[
rtems_resource_maximum_per_allocation(
@@ -2779,8 +2732,18 @@ struct _reent *__getreent(void)
*/
#ifdef CONFIGURE_INIT
#if defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE)
+ const rtems_initialization_tasks_table _RTEMS_tasks_User_task_table = {
+ CONFIGURE_INIT_TASK_NAME,
+ CONFIGURE_INIT_TASK_STACK_SIZE,
+ CONFIGURE_INIT_TASK_PRIORITY,
+ CONFIGURE_INIT_TASK_ATTRIBUTES,
+ CONFIGURE_INIT_TASK_ENTRY_POINT,
+ CONFIGURE_INIT_TASK_INITIAL_MODES,
+ CONFIGURE_INIT_TASK_ARGUMENTS
+ };
+
RTEMS_SYSINIT_ITEM(
- _RTEMS_tasks_Initialize_user_tasks_body,
+ _RTEMS_tasks_Initialize_user_task,
RTEMS_SYSINIT_CLASSIC_USER_TASKS,
RTEMS_SYSINIT_ORDER_MIDDLE
);
diff --git a/cpukit/include/rtems/config.h b/cpukit/include/rtems/config.h
index 51e437f48a..24a654e39c 100644
--- a/cpukit/include/rtems/config.h
+++ b/cpukit/include/rtems/config.h
@@ -248,9 +248,6 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
1
#endif
-#define rtems_configuration_get_rtems_api_configuration() \
- (&Configuration_RTEMS_API)
-
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/include/rtems/rtems/config.h b/cpukit/include/rtems/rtems/config.h
index 63449be922..a5078f6bb6 100644
--- a/cpukit/include/rtems/rtems/config.h
+++ b/cpukit/include/rtems/rtems/config.h
@@ -55,17 +55,9 @@ typedef struct {
* This field is the set of Classic API Initialization
* Tasks which are configured for this application.
*/
- rtems_initialization_tasks_table *User_initialization_tasks_table;
+ const rtems_initialization_tasks_table *User_initialization_tasks_table;
} rtems_api_configuration_table;
-/**
- * @brief RTEMS API Configuration Table
- *
- * This is the RTEMS API Configuration Table expected to be generated
- * by confdefs.h.
- */
-extern rtems_api_configuration_table Configuration_RTEMS_API;
-
/**@}*/
uint32_t rtems_configuration_get_maximum_barriers( void );
@@ -86,6 +78,9 @@ uint32_t rtems_configuration_get_maximum_timers( void );
uint32_t rtems_configuration_get_maximum_tasks( void );
+const rtems_api_configuration_table *
+rtems_configuration_get_rtems_api_configuration( void );
+
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/include/rtems/rtems/tasksdata.h b/cpukit/include/rtems/rtems/tasksdata.h
index 19e6a8a618..55090f71b0 100644
--- a/cpukit/include/rtems/rtems/tasksdata.h
+++ b/cpukit/include/rtems/rtems/tasksdata.h
@@ -53,19 +53,18 @@ typedef struct {
} RTEMS_API_Control;
/**
- * @brief _RTEMS_tasks_Initialize_user_tasks_body
+ * @brief Initialization table for the first user task.
*
- * This routine creates and starts all configured user
- * initialization threads.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * RTEMS Task Manager
+ * This table is used by _RTEMS_tasks_Initialize_user_task() and initialized
+ * via <rtems/confdefs.h>.
*/
+extern const rtems_initialization_tasks_table _RTEMS_tasks_User_task_table;
-extern void _RTEMS_tasks_Initialize_user_tasks_body( void );
+/**
+ * @brief System initialization handler to create and start the first user
+ * task.
+ */
+extern void _RTEMS_tasks_Initialize_user_task( void );
/**
* The following instantiates the information control block used to