summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/src/exinit.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-01-25 20:55:52 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-02-03 10:00:51 +0100
commit36b86d7eb5e51a62c0cee1906210b389c2ab96eb (patch)
treeef4e1ccf886528fab4ca8ef1ca4feff0e3048e3a /cpukit/sapi/src/exinit.c
parentStatically initialize _Objects_Information_table (diff)
downloadrtems-36b86d7eb5e51a62c0cee1906210b389c2ab96eb.tar.bz2
score: Create idle threads via linker set
This allows a more fine grained rtems_initialize_data_structures(). Update #2408.
Diffstat (limited to 'cpukit/sapi/src/exinit.c')
-rw-r--r--cpukit/sapi/src/exinit.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c
index 7c1ffd65ec..faaf283a30 100644
--- a/cpukit/sapi/src/exinit.c
+++ b/cpukit/sapi/src/exinit.c
@@ -142,21 +142,6 @@ static void rtems_initialize_data_structures(void)
_Extension_Manager_initialization();
_POSIX_API_Initialize();
-
- _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
-
- /*
- * No threads should be created before this point!!!
- * _Thread_Executing and _Thread_Heir are not set.
- *
- * At this point all API extensions are in place. After the call to
- * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set.
- */
- _Thread_Create_idle();
-
- /*
- * Scheduling can properly occur now as long as we avoid dispatching.
- */
}
static void rtems_initialize_before_drivers(void)
@@ -261,6 +246,21 @@ RTEMS_SYSINIT_ITEM(
RTEMS_SYSINIT_ORDER_MIDDLE
);
+/*
+ * No threads should be created before this point!!!
+ * _Thread_Executing and _Thread_Heir are not set.
+ *
+ * At this point all API extensions are in place. After the call to
+ * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set.
+ *
+ * Scheduling can properly occur afterwards as long as we avoid dispatching.
+ */
+RTEMS_SYSINIT_ITEM(
+ _Thread_Create_idle,
+ RTEMS_SYSINIT_IDLE_THREADS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
RTEMS_SYSINIT_ITEM(
rtems_initialize_before_drivers,
RTEMS_SYSINIT_BEFORE_DRIVERS,