diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-07-23 17:25:31 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-07-23 17:25:31 +0000 |
commit | 6c71b25364d2720a54d4e4d27ead1292a3fc4977 (patch) | |
tree | d1bb042c60328acb5e5ece9a78e9cb64b88cc58f /cpukit/score | |
parent | usee inttypes.h for output format specifiers (diff) | |
download | rtems-6c71b25364d2720a54d4e4d27ead1292a3fc4977.tar.bz2 |
2008-07-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* sapi/include/confdefs.h, score/src/threadcreateidle.c: Idle thread
body is now completely configured via the Configuration table.
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/src/threadcreateidle.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c index bcbfcf3039..2643d7248c 100644 --- a/cpukit/score/src/threadcreateidle.c +++ b/cpukit/score/src/threadcreateidle.c @@ -36,38 +36,20 @@ * _Thread_Create_idle */ -const char *_Thread_Idle_name = "IDLE"; - void _Thread_Create_idle( void ) { - void *idle; - uint32_t idle_task_stack_size; + Objects_Name name; + + name.name_p = "IDLE"; /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ - _Thread_Idle = _Thread_Internal_allocate(); /* - * Initialize the IDLE task. - */ - -#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE) - idle = (void *) _CPU_Thread_Idle_body; -#else - idle = (void *) _Thread_Idle_body; -#endif - - if ( _Configuration_Table->idle_task ) - idle = _Configuration_Table->idle_task; - - idle_task_stack_size = - _Stack_Ensure_minimum( _Configuration_Table->idle_task_stack_size ); - - /* * This is only called during initialization and we better be sure * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. @@ -78,14 +60,14 @@ void _Thread_Create_idle( void ) &_Thread_Internal_information, _Thread_Idle, NULL, /* allocate the stack */ - idle_task_stack_size, + _Stack_Ensure_minimum( _Configuration_Table->idle_task_stack_size ), CPU_IDLE_TASK_IS_FP, PRIORITY_MAXIMUM, TRUE, /* preemptable */ THREAD_CPU_BUDGET_ALGORITHM_NONE, NULL, /* no budget algorithm callout */ 0, /* all interrupts enabled */ - (Objects_Name) _Thread_Idle_name + name ); _Thread_Unnest_dispatch(); @@ -94,14 +76,13 @@ void _Thread_Create_idle( void ) * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ - _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( _Thread_Idle, THREAD_START_NUMERIC, - idle, + _Configuration_Table->idle_task, NULL, 0 ); |