diff options
-rw-r--r-- | c/src/exec/posix/src/pthread.c | 5 | ||||
-rw-r--r-- | cpukit/posix/src/pthread.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c index 1296af9e70..2f26b5f58e 100644 --- a/c/src/exec/posix/src/pthread.c +++ b/c/src/exec/posix/src/pthread.c @@ -450,7 +450,10 @@ int pthread_attr_setstacksize( if ( !attr || !attr->is_initialized ) return EINVAL; - attr->stacksize = stacksize; + if ( stacksize < STACK_MINIMUM_SIZE ) + attr->stacksize = STACK_MINIMUM_SIZE; + else + attr->stacksize = stacksize; return 0; } diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index 1296af9e70..2f26b5f58e 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -450,7 +450,10 @@ int pthread_attr_setstacksize( if ( !attr || !attr->is_initialized ) return EINVAL; - attr->stacksize = stacksize; + if ( stacksize < STACK_MINIMUM_SIZE ) + attr->stacksize = STACK_MINIMUM_SIZE; + else + attr->stacksize = stacksize; return 0; } |