anchao commented on PR #2892: URL: https://github.com/apache/nuttx-apps/pull/2892#issuecomment-2548443385
> Thank you @anchao :-) Two questions: > > 1. This is a build-time option to disable `sigmask` display.. how about a runtime switch (i.e. `ps -O flags` [1])? @cederom Thanks for review, In some platform where resources are limited and signal support is not actually needed, adding command options will increase the size of NuttX firmware. I think a better way is to allow developers to choose to turn off this feature to reduce the impact on performance and code size. > 2. The other `ps` display options are also build time configuration but use `PS_SHOW_*` (i.e. `PS_SHOW_STACKUSAGE`) why not use `PS_SHOW_SIGMASK` to align with other options? > > [1] https://man.freebsd.org/cgi/man.cgi?query=ps The other options are determining factors are composed of multiple conditions, such as: CONFIG_MM_BACKTRACE and CONFIG_NSH_DISABLE_PSHEAPUSAGE ``` #if CONFIG_MM_BACKTRACE >= 0 && !defined(CONFIG_NSH_DISABLE_PSHEAPUSAGE) # define PS_SHOW_HEAPSIZE #endif ``` CONFIG_NSH_DISABLE_PSSTACKUSAGE and CONFIG_STACK_COLORATION ``` #ifndef CONFIG_NSH_DISABLE_PSSTACKUSAGE # define PS_SHOW_STACKSIZE # ifdef CONFIG_STACK_COLORATION # define PS_SHOW_STACKUSAGE # endif #endif ``` sigmask are only related to nsh configuration, so there is no need to define a specific macro. Of course, if there are multiple conditions later, we can consider to implement it. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
