summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-05-29 18:46:46 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-05-29 18:46:46 +0000
commit9c877c0df6c700897e160c3f75cc127affb70ff5 (patch)
treee85003f92c85b08093b2c9aced0ed9ebb9cf4d70 /c
parent*** empty log message *** (diff)
downloadrtems-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.c5
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;
}