forked from Imagelibrary/rtems
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user