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.
This commit is contained in:
Joel Sherrill
1996-05-29 18:46:46 +00:00
parent 98849f4487
commit 9c877c0df6
2 changed files with 8 additions and 2 deletions

View File

@@ -450,6 +450,9 @@ int pthread_attr_setstacksize(
if ( !attr || !attr->is_initialized ) if ( !attr || !attr->is_initialized )
return EINVAL; return EINVAL;
if ( stacksize < STACK_MINIMUM_SIZE )
attr->stacksize = STACK_MINIMUM_SIZE;
else
attr->stacksize = stacksize; attr->stacksize = stacksize;
return 0; return 0;
} }

View File

@@ -450,6 +450,9 @@ int pthread_attr_setstacksize(
if ( !attr || !attr->is_initialized ) if ( !attr || !attr->is_initialized )
return EINVAL; return EINVAL;
if ( stacksize < STACK_MINIMUM_SIZE )
attr->stacksize = STACK_MINIMUM_SIZE;
else
attr->stacksize = stacksize; attr->stacksize = stacksize;
return 0; return 0;
} }