mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Add warning message to ensure min stack size (#575)
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
This commit is contained in:
parent
963abe6c48
commit
1d20f0eba2
7
portable/ThirdParty/GCC/Posix/port.c
vendored
7
portable/ThirdParty/GCC/Posix/port.c
vendored
|
@ -148,7 +148,12 @@ portSTACK_TYPE * pxPortInitialiseStack( portSTACK_TYPE * pxTopOfStack,
|
||||||
thread->xDying = pdFALSE;
|
thread->xDying = pdFALSE;
|
||||||
|
|
||||||
pthread_attr_init( &xThreadAttributes );
|
pthread_attr_init( &xThreadAttributes );
|
||||||
pthread_attr_setstack( &xThreadAttributes, pxEndOfStack, ulStackSize );
|
iRet = pthread_attr_setstack( &xThreadAttributes, pxEndOfStack, ulStackSize );
|
||||||
|
if( iRet != 0 )
|
||||||
|
{
|
||||||
|
fprintf( stderr, "[WARN] pthread_attr_setstack failed with return value: %d. Default stack will be used.\n", iRet );
|
||||||
|
fprintf( stderr, "[WARN] Increase the stack size to PTHREAD_STACK_MIN.\n" );
|
||||||
|
}
|
||||||
|
|
||||||
thread->ev = event_create();
|
thread->ev = event_create();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue