xiaoxiang781216 commented on code in PR #6197:
URL: https://github.com/apache/incubator-nuttx/pull/6197#discussion_r879660728


##########
libs/libc/stdlib/Kconfig:
##########
@@ -39,4 +39,11 @@ config LIBC_MAX_TMPFILE
                maximum size of that last filename.  This size is the size of 
the full
                file path.
 
+config LIBC_MAX_EXITFUNS
+       int "Maximum amount of exit functions"
+       default 1

Review Comment:
   > The old default amount was 1 if the config was disabled.
   
   The old implementation has two config:
   
   1. CONFIG_SCHED_ATEXIT
   2. CONFIG_SCHED_ONEXIT_MAX
   
   If CONFIG_SCHED_ATEXIT is disabled, all related code get removed in the old 
implementation regardless whether CONFIG_SCHED_ONEXIT_MAX is zero or not. But 
in the new implementation, we just have one config: CONFIG_LIBC_MAX_EXITFUNS, 
so I think it's good choice to let zero value mean disable atexit stuff at all.
   
   > The config is not optional any longer, the support for exit functions are 
compiled unconditionally. Do you want me to set default to 0 and disable 
compilation in this case too ?
   
   Yes, since it could save the code space when the user don't need this 
feature, but doesn't make the code become too complex.



-- 
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