diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-05-29 18:46:46 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-05-29 18:46:46 +0000 |
commit | 9c877c0df6c700897e160c3f75cc127affb70ff5 (patch) | |
tree | e85003f92c85b08093b2c9aced0ed9ebb9cf4d70 /c | |
parent | *** empty log message *** (diff) | |
download | rtems-9c877c0df6c700897e160c3f75cc127affb70ff5.tar.bz2 |
addressed minimum stack size attribute.
There is a potential problem if setting PTHREAD_STACK_MIN to 0 does not
work with all applications since it is in limit.h over in newlib. There
is a potential build order issue with newlib needing to know the rtems
cpu dependent stack size minimum.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/exec/posix/src/pthread.c | 5 |
1 files changed, 4 insertions, 1 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; } |