From 16775a55354508f1aa434c1d347e6921006b49a2 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 7 May 1999 16:36:29 +0000 Subject: Patch from Jiri Gaisler to allow stacksize of POSIX Init thread to be user configured. --- cpukit/posix/include/rtems/posix/config.h | 1 + cpukit/posix/src/pthread.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'cpukit/posix') 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( -- cgit v1.2.3