summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c/src/exec/score/cpu/a29k/cpu.h1
-rw-r--r--c/src/exec/score/cpu/i386/cpu.h1
-rw-r--r--c/src/exec/score/cpu/i960/cpu.h1
-rw-r--r--c/src/exec/score/cpu/m68k/cpu.h1
-rw-r--r--c/src/exec/score/cpu/mips64orion/cpu.h1
-rw-r--r--c/src/exec/score/cpu/no_cpu/cpu.h1
-rw-r--r--c/src/exec/score/cpu/powerpc/cpu.h1
-rw-r--r--c/src/exec/score/cpu/sh/cpu.h1
-rw-r--r--c/src/exec/score/cpu/sparc/cpu.h1
-rw-r--r--c/src/exec/score/cpu/unix/cpu.h1
-rw-r--r--c/src/exec/score/headers/thread.h8
-rw-r--r--c/src/exec/score/include/rtems/score/thread.h8
-rw-r--r--c/src/exec/score/src/thread.c9
-rw-r--r--c/src/tests/sptests/spsize/size.c2
-rw-r--r--cpukit/score/include/rtems/score/thread.h8
-rw-r--r--cpukit/score/src/thread.c9
-rw-r--r--testsuites/sptests/spsize/size.c2
17 files changed, 26 insertions, 30 deletions
diff --git a/c/src/exec/score/cpu/a29k/cpu.h b/c/src/exec/score/cpu/a29k/cpu.h
index 6578621f79..3bc939ca91 100644
--- a/c/src/exec/score/cpu/a29k/cpu.h
+++ b/c/src/exec/score/cpu/a29k/cpu.h
@@ -456,6 +456,7 @@ typedef struct {
void (*postdriver_hook)( void );
void (*idle_task)( void );
boolean do_zero_of_workspace;
+ unsigned32 idle_task_stack_size;
unsigned32 interrupt_stack_size;
unsigned32 extra_system_initialization_stack;
unsigned32 some_other_cpu_dependent_info;
diff --git a/c/src/exec/score/cpu/i386/cpu.h b/c/src/exec/score/cpu/i386/cpu.h
index 8620ad8392..28d450dad6 100644
--- a/c/src/exec/score/cpu/i386/cpu.h
+++ b/c/src/exec/score/cpu/i386/cpu.h
@@ -184,6 +184,7 @@ typedef struct {
void (*postdriver_hook)( void );
void (*idle_task)( void );
boolean do_zero_of_workspace;
+ unsigned32 idle_task_stack_size;
unsigned32 interrupt_stack_size;
unsigned32 extra_mpci_receive_server_stack;
void * (*stack_allocate_hook)( unsigned32 );
diff --git a/c/src/exec/score/cpu/i960/cpu.h b/c/src/exec/score/cpu/i960/cpu.h
index 2a0882149b..1deb8c08b4 100644
--- a/c/src/exec/score/cpu/i960/cpu.h
+++ b/c/src/exec/score/cpu/i960/cpu.h
@@ -162,6 +162,7 @@ typedef struct {
void (*postdriver_hook)( void );
void (*idle_task)( void );
boolean do_zero_of_workspace;
+ unsigned32 idle_task_stack_size;
unsigned32 interrupt_stack_size;
unsigned32 extra_mpci_receive_server_stack;
void * (*stack_allocate_hook)( unsigned32 );
diff --git a/c/src/exec/score/cpu/m68k/cpu.h b/c/src/exec/score/cpu/m68k/cpu.h
index 9dc45516de..743677a944 100644
--- a/c/src/exec/score/cpu/m68k/cpu.h
+++ b/c/src/exec/score/cpu/m68k/cpu.h
@@ -185,6 +185,7 @@ typedef struct {
void (*postdriver_hook)( void );
void (*idle_task)( void );
boolean do_zero_of_workspace;
+ unsigned32 idle_task_stack_size;
unsigned32 interrupt_stack_size;
unsigned32 extra_mpci_receive_server_stack;
void * (*stack_allocate_hook)( unsigned32 );
diff --git a/c/src/exec/score/cpu/mips64orion/cpu.h b/c/src/exec/score/cpu/mips64orion/cpu.h
index 684d9d590e..0dfa3b0e98 100644
--- a/c/src/exec/score/cpu/mips64orion/cpu.h
+++ b/c/src/exec/score/cpu/mips64orion/cpu.h
@@ -428,6 +428,7 @@ typedef struct {
void (*postdriver_hook)( void );
void (*idle_task)( void );
boolean do_zero_of_workspace;
+ unsigned32 idle_task_stack_size;
unsigned32 interrupt_stack_size;
unsigned32 extra_mpci_receive_server_stack;
void * (*stack_allocate_hook)( unsigned32 );
diff --git a/c/src/exec/score/cpu/no_cpu/cpu.h b/c/src/exec/score/cpu/no_cpu/cpu.h
index 77c06f4a55..68d75c6b9f 100644
--- a/c/src/exec/score/cpu/no_cpu/cpu.h
+++ b/c/src/exec/score/cpu/no_cpu/cpu.h
@@ -353,6 +353,7 @@ typedef struct {
void (*postdriver_hook)( void );
void (*idle_task)( void );
boolean do_zero_of_workspace;
+ unsigned32 idle_task_stack_size;
unsigned32 interrupt_stack_size;
unsigned32 extra_mpci_receive_server_stack;
void * (*stack_allocate_hook)( unsigned32 );
diff --git a/c/src/exec/score/cpu/powerpc/cpu.h b/c/src/exec/score/cpu/powerpc/cpu.h
index b966f5895b..6288b3e20a 100644
--- a/c/src/exec/score/cpu/powerpc/cpu.h
+++ b/c/src/exec/score/cpu/powerpc/cpu.h
@@ -463,6 +463,7 @@ typedef struct {
void (*postdriver_hook)( void );
void (*idle_task)( void );
boolean do_zero_of_workspace;
+ unsigned32 idle_task_stack_size;
unsigned32 interrupt_stack_size;
unsigned32 extra_mpci_receive_server_stack;
void * (*stack_allocate_hook)( unsigned32 );
diff --git a/c/src/exec/score/cpu/sh/cpu.h b/c/src/exec/score/cpu/sh/cpu.h
index 2f6ee4515d..0a67679b5e 100644
--- a/c/src/exec/score/cpu/sh/cpu.h
+++ b/c/src/exec/score/cpu/sh/cpu.h
@@ -371,6 +371,7 @@ typedef struct {
void (*postdriver_hook)( void );
void (*idle_task)( void );
boolean do_zero_of_workspace;
+ unsigned32 idle_task_stack_size;
unsigned32 interrupt_stack_size;
unsigned32 extra_mpci_receive_server_stack;
void * (*stack_allocate_hook)( unsigned32 );
diff --git a/c/src/exec/score/cpu/sparc/cpu.h b/c/src/exec/score/cpu/sparc/cpu.h
index 3f09e24a5b..592a3a438f 100644
--- a/c/src/exec/score/cpu/sparc/cpu.h
+++ b/c/src/exec/score/cpu/sparc/cpu.h
@@ -517,6 +517,7 @@ typedef struct {
void (*postdriver_hook)( void );
void (*idle_task)( void );
boolean do_zero_of_workspace;
+ unsigned32 idle_task_stack_size;
unsigned32 interrupt_stack_size;
unsigned32 extra_mpci_receive_server_stack;
void * (*stack_allocate_hook)( unsigned32 );
diff --git a/c/src/exec/score/cpu/unix/cpu.h b/c/src/exec/score/cpu/unix/cpu.h
index 1a33365c2b..227a631139 100644
--- a/c/src/exec/score/cpu/unix/cpu.h
+++ b/c/src/exec/score/cpu/unix/cpu.h
@@ -504,6 +504,7 @@ typedef struct {
void (*postdriver_hook)( void );
void (*idle_task)( void );
boolean do_zero_of_workspace;
+ unsigned32 idle_task_stack_size;
unsigned32 interrupt_stack_size;
unsigned32 extra_mpci_receive_server_stack;
void * (*stack_allocate_hook)( unsigned32 );
diff --git a/c/src/exec/score/headers/thread.h b/c/src/exec/score/headers/thread.h
index 0108536cd5..da6fa76bd0 100644
--- a/c/src/exec/score/headers/thread.h
+++ b/c/src/exec/score/headers/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/c/src/exec/score/include/rtems/score/thread.h b/c/src/exec/score/include/rtems/score/thread.h
index 0108536cd5..da6fa76bd0 100644
--- a/c/src/exec/score/include/rtems/score/thread.h
+++ b/c/src/exec/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/c/src/exec/score/src/thread.c b/c/src/exec/score/src/thread.c
index b5c96dcfb3..4e44ac6f75 100644
--- a/c/src/exec/score/src/thread.c
+++ b/c/src/exec/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 */
diff --git a/c/src/tests/sptests/spsize/size.c b/c/src/tests/sptests/spsize/size.c
index 41724115b4..841cdd7969 100644
--- a/c/src/tests/sptests/spsize/size.c
+++ b/c/src/tests/sptests/spsize/size.c
@@ -98,7 +98,7 @@
#endif
#define SYSTEM_TASKS \
- (THREAD_IDLE_STACK_SIZE + \
+ (MINIMUM_STACK_SIZE + \
MPCI_RECEIVE_SERVER_STACK_SIZE + \
(2*sizeof(Thread_Control))) + \
MPCI_RECEIVE_SERVER_FP + \
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 */
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index 41724115b4..841cdd7969 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -98,7 +98,7 @@
#endif
#define SYSTEM_TASKS \
- (THREAD_IDLE_STACK_SIZE + \
+ (MINIMUM_STACK_SIZE + \
MPCI_RECEIVE_SERVER_STACK_SIZE + \
(2*sizeof(Thread_Control))) + \
MPCI_RECEIVE_SERVER_FP + \