yamt commented on pull request #4977:
URL: https://github.com/apache/incubator-nuttx/pull/4977#issuecomment-1016105024


   > > i'm not sure if this is a good idea because
   > > 
   > > * this breaks existing configurations
   > 
   > Could you explain more?
   
   if you have a config with stack sizes adjusted carefully, it won't work as 
expected anymore.
   
   > 
   > > * it makes stack-related api very confusing (eg. pthread_attr_setstack 
and pthread_attr_setstacksize)
   > 
   > SIM_STACKSIZE_ADJUSTMENT is used only for sim, the stack on sim already 
has huge difference to other arch. This patch is try to fix the program hard 
code the stack size in code or config with a fixed default value.
   
   the difference from other arch is not a problem as it's arch-dependent in 
the first place.
   
   my concern is inconsistency within sim.
   with this change, an app using pthread_attr_setstack and an app using 
pthread_attr_setstacksize
   need to have different ideas of stack size.
   
   > 
   > > * stacksize is inherently arch-dependent
   > 
   > DEFAULT_TASK_STACKSIZE could cover the most arch difference.
   
   the stack usage is actually different.
   it's more natural to use different values to reflect the reality than trying 
to maintain the illusion of "one value fit all".
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to