summaryrefslogtreecommitdiffstats
path: root/cpukit/score
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/score
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/score')
-rw-r--r--cpukit/score/include/rtems/sysinit.h1
-rw-r--r--cpukit/score/src/threadcreateidle.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/sysinit.h b/cpukit/score/include/rtems/sysinit.h
index 855198d4d8..e6fe62f230 100644
--- a/cpukit/score/include/rtems/sysinit.h
+++ b/cpukit/score/include/rtems/sysinit.h
@@ -29,6 +29,7 @@ extern "C" {
#define RTEMS_SYSINIT_BSP_WORK_AREAS 000100
#define RTEMS_SYSINIT_BSP_START 000200
#define RTEMS_SYSINIT_DATA_STRUCTURES 000300
+#define RTEMS_SYSINIT_IDLE_THREADS 000380
#define RTEMS_SYSINIT_BSP_LIBC 000400
#define RTEMS_SYSINIT_BEFORE_DRIVERS 000500
#define RTEMS_SYSINIT_BSP_PRE_DRIVERS 000600
diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c
index 3430881f39..a07e238293 100644
--- a/cpukit/score/src/threadcreateidle.c
+++ b/cpukit/score/src/threadcreateidle.c
@@ -21,6 +21,7 @@
#include <rtems/score/threadimpl.h>
#include <rtems/score/schedulerimpl.h>
#include <rtems/score/stackimpl.h>
+#include <rtems/score/sysstate.h>
#include <rtems/score/userextimpl.h>
#include <rtems/config.h>
@@ -84,6 +85,8 @@ void _Thread_Create_idle( void )
uint32_t cpu_count = _SMP_Get_processor_count();
uint32_t cpu_index;
+ _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
+
for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) {
Per_CPU_Control *cpu = _Per_CPU_Get_by_index( cpu_index );