Skip to content

Commit

Permalink
Revert pthread_attr_setstacksize
Browse files Browse the repository at this point in the history
  • Loading branch information
chinglee-iot committed Jan 10, 2024
1 parent 8cdc1ad commit d9fb099
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions portable/ThirdParty/GCC/Posix/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,12 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
ulStackSize = ( ulStackSize < PTHREAD_STACK_MIN ) ? PTHREAD_STACK_MIN : ulStackSize;

pthread_attr_init( &xThreadAttributes );
iRet = pthread_attr_setstacksize( &xThreadAttributes, ulStackSize );
iRet = pthread_attr_setstack( &xThreadAttributes, pxEndOfStack, ulStackSize );

if( iRet != 0 )
{
fprintf( stderr, "[WARN] pthread_attr_setstacksize failed with return value: %d. Default stack size will be used.\n", iRet );
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();
Expand Down

0 comments on commit d9fb099

Please sign in to comment.