diff options
Diffstat (limited to '')
-rw-r--r-- | c/src/exec/posix/include/rtems/posix/config.h | 1 | ||||
-rw-r--r-- | c/src/exec/posix/src/pthread.c | 2 | ||||
-rw-r--r-- | c/src/exec/sapi/include/confdefs.h | 10 | ||||
-rw-r--r-- | cpukit/posix/include/rtems/posix/config.h | 1 | ||||
-rw-r--r-- | cpukit/posix/src/pthread.c | 2 | ||||
-rw-r--r-- | cpukit/sapi/include/confdefs.h | 10 |
6 files changed, 20 insertions, 6 deletions
diff --git a/c/src/exec/posix/include/rtems/posix/config.h b/c/src/exec/posix/include/rtems/posix/config.h index c64250579c..2edb8a1909 100644 --- a/c/src/exec/posix/include/rtems/posix/config.h +++ b/c/src/exec/posix/include/rtems/posix/config.h @@ -39,6 +39,7 @@ extern "C" { typedef struct { void *(*thread_entry)(void *); + int stack_size; } posix_initialization_threads_table; typedef struct { diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c index f97b3a805d..1a238b006a 100644 --- a/c/src/exec/posix/src/pthread.c +++ b/c/src/exec/posix/src/pthread.c @@ -260,7 +260,7 @@ void _POSIX_Threads_Initialize_user_threads( void ) status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); assert( !status ); - status = pthread_attr_setstacksize( &attr, PTHREAD_MINIMUM_STACK_SIZE * 2 ); + status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size); assert( !status ); status = pthread_create( diff --git a/c/src/exec/sapi/include/confdefs.h b/c/src/exec/sapi/include/confdefs.h index 0cec9c8f15..dac5482905 100644 --- a/c/src/exec/sapi/include/confdefs.h +++ b/c/src/exec/sapi/include/confdefs.h @@ -361,6 +361,10 @@ rtems_extensions_table Configuration_Initial_Extensions[] = { #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0 #endif +#ifndef CONFIGURE_POSIX_INIT_TASK_STACK_SIZE +#define CONFIGURE_POSIX_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2) +#endif + #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE #ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE @@ -378,7 +382,8 @@ rtems_extensions_table Configuration_Initial_Extensions[] = { #ifdef CONFIGURE_INIT posix_initialization_threads_table POSIX_Initialization_threads[] = { - { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT } + { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \ + CONFIGURE_POSIX_INIT_TASK_STACK_SIZE } }; #endif @@ -433,7 +438,8 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = { CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \ CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \ CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \ - CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) \ + CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \ + (CONFIGURE_POSIX_INIT_TASK_STACK_SIZE) \ ) diff --git a/cpukit/posix/include/rtems/posix/config.h b/cpukit/posix/include/rtems/posix/config.h index c64250579c..2edb8a1909 100644 --- a/cpukit/posix/include/rtems/posix/config.h +++ b/cpukit/posix/include/rtems/posix/config.h @@ -39,6 +39,7 @@ extern "C" { typedef struct { void *(*thread_entry)(void *); + int stack_size; } posix_initialization_threads_table; typedef struct { diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index f97b3a805d..1a238b006a 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -260,7 +260,7 @@ void _POSIX_Threads_Initialize_user_threads( void ) status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); assert( !status ); - status = pthread_attr_setstacksize( &attr, PTHREAD_MINIMUM_STACK_SIZE * 2 ); + status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size); assert( !status ); status = pthread_create( diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index 0cec9c8f15..dac5482905 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -361,6 +361,10 @@ rtems_extensions_table Configuration_Initial_Extensions[] = { #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0 #endif +#ifndef CONFIGURE_POSIX_INIT_TASK_STACK_SIZE +#define CONFIGURE_POSIX_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2) +#endif + #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE #ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE @@ -378,7 +382,8 @@ rtems_extensions_table Configuration_Initial_Extensions[] = { #ifdef CONFIGURE_INIT posix_initialization_threads_table POSIX_Initialization_threads[] = { - { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT } + { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \ + CONFIGURE_POSIX_INIT_TASK_STACK_SIZE } }; #endif @@ -433,7 +438,8 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = { CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \ CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \ CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \ - CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) \ + CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \ + (CONFIGURE_POSIX_INIT_TASK_STACK_SIZE) \ ) |