[rtems commit] confdefs.h: Minor rework to avoid warnings when CONFIGURE_HAS_OWN_INIT_TABLE
Joel Sherrill
joel at rtems.org
Mon Feb 19 19:09:30 UTC 2018
Module: rtems
Branch: master
Commit: c232b378b8f688cdd4691bb558d9d23fa7791ec9
Changeset: http://git.rtems.org/rtems/commit/?id=c232b378b8f688cdd4691bb558d9d23fa7791ec9
Author: Joel Sherrill <joel at rtems.org>
Date: Mon Feb 19 13:05:57 2018 -0600
confdefs.h: Minor rework to avoid warnings when CONFIGURE_HAS_OWN_INIT_TABLE
CONFIGURE_HAS_OWN_INIT_TABLE was used both with and without
defining CONFIGURE_RTEMS_INIT_TASKS_TABLE. This rework allows
it to work both ways without warnings.
---
cpukit/include/rtems/confdefs.h | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h
index f1c817d..be937ab 100755
--- a/cpukit/include/rtems/confdefs.h
+++ b/cpukit/include/rtems/confdefs.h
@@ -1378,19 +1378,15 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
* This group contains the elements needed to define the Classic API
* Initialization Tasks Table.
*
- * Default User Initialization Task Table. This table guarantees that
- * one user initialization table is defined.
- */
-#ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE
-
-/*
- * The user is defining their own table information and setting the
+ * Default User Initialization Task Table. This table guarantees that
+ * one user initialization table is defined.
+ *
+ * WHEN CONFIGURE_HAS_OWN_INIT_TASK_TABLE is defined, the user is
+ * responsible for defining their own table information and setting the
* appropriate variables.
*/
-
-#else
+#if defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \
+ !defined(CONFIGURE_HAS_OWN_INIT_TASK_TABLE)
/**
* When using the default Classic API Initialization Tasks Table, this is
@@ -1485,9 +1481,14 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#define CONFIGURE_INIT_TASK_TABLE_SIZE \
RTEMS_ARRAY_SIZE(CONFIGURE_INIT_TASK_TABLE)
-#endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */
-
#else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */
+#ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE
+
+/*
+ * The user application is responsible for defining everything
+ * when CONFIGURE_HAS_OWN_INIT_TABLE is defined.
+ */
+#else /* not using standard or providing own Init Task Table */
/*
* This is the name of the Initialization Task when none is configured.
@@ -1504,6 +1505,8 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
*/
#define CONFIGURE_INIT_TASK_STACK_SIZE 0
+#endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */
+
#endif
/**@}*/ /* end of Classic API Initialization Tasks Table */
More information about the vc
mailing list