diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-01-07 09:55:45 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-01-11 08:47:01 +0100 |
commit | ccd54344d904b657123e4e4ba795a32212382be2 (patch) | |
tree | d490d77b6173f586137036ed07ec5bd27d8ca65a /cpukit/score/src/threadcreateidle.c | |
parent | smptests/README: Delete obsolete information (diff) | |
download | rtems-ccd54344d904b657123e4e4ba795a32212382be2.tar.bz2 |
score: Introduce Thread_Entry_information
This avoids potential dead code in _Thread_Handler(). It gets rid of
the dangerous function pointer casts.
Update #2514.
Diffstat (limited to 'cpukit/score/src/threadcreateidle.c')
-rw-r--r-- | cpukit/score/src/threadcreateidle.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c index 8a5812f1a5..e9d12dc963 100644 --- a/cpukit/score/src/threadcreateidle.c +++ b/cpukit/score/src/threadcreateidle.c @@ -25,6 +25,14 @@ static void _Thread_Create_idle_for_cpu( Per_CPU_Control *cpu ) { + Thread_Entry_information entry = { + .adaptor = _Thread_Entry_adaptor_idle, + .Kinds = { + .Idle = { + .entry = rtems_configuration_get_idle_task() + } + } + }; Objects_Name name; Thread_Control *idle; @@ -59,14 +67,7 @@ static void _Thread_Create_idle_for_cpu( Per_CPU_Control *cpu ) cpu->heir = cpu->executing = idle; - _Thread_Start( - idle, - THREAD_START_NUMERIC, - rtems_configuration_get_idle_task(), - NULL, - 0, - cpu - ); + _Thread_Start( idle, &entry, cpu ); } void _Thread_Create_idle( void ) |