diff options
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 8 | ||||
-rw-r--r-- | cpukit/score/src/thread.c | 9 |
2 files changed, 7 insertions, 10 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 0108536cd5..da6fa76bd0 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -192,14 +192,6 @@ struct Thread_Control_struct { }; /* - * The following constants define the stack size requirements for - * the idle thread. - */ - - -#define THREAD_IDLE_STACK_SIZE STACK_MINIMUM_SIZE - -/* * The following defines the information control block used to * manage this class of objects. */ diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c index b5c96dcfb3..4e44ac6f75 100644 --- a/cpukit/score/src/thread.c +++ b/cpukit/score/src/thread.c @@ -107,7 +107,8 @@ void _Thread_Handler_initialization( void _Thread_Create_idle( void ) { - void *idle; + void *idle; + unsigned32 idle_task_stack_size; /* * The entire workspace is zeroed during its initialization. Thus, all @@ -130,11 +131,15 @@ void _Thread_Create_idle( void ) if ( _CPU_Table.idle_task ) idle = _CPU_Table.idle_task; + idle_task_stack_size = _CPU_Table.idle_task_stack_size; + if ( idle_task_stack_size < STACK_MINIMUM_SIZE ) + idle_task_stack_size = STACK_MINIMUM_SIZE; + _Thread_Initialize( &_Thread_Internal_information, _Thread_Idle, NULL, /* allocate the stack */ - THREAD_IDLE_STACK_SIZE, + idle_task_stack_size, CPU_IDLE_TASK_IS_FP, PRIORITY_MAXIMUM, TRUE, /* preemptable */ |