nshlib: apply configured priority/stacksize under CONFIG_BUILD_KERNEL#3635
Closed
hitHuang wants to merge 1 commit into
Closed
nshlib: apply configured priority/stacksize under CONFIG_BUILD_KERNEL#3635hitHuang wants to merge 1 commit into
hitHuang wants to merge 1 commit into
Conversation
nsh_fileapp() ignored an application's configured priority/stacksize under CONFIG_BUILD_KERNEL, since the registry table it reads was gated on CONFIG_BUILTIN, which depends on !BUILD_KERNEL. Switch builtin/Make.defs and nsh_fileapps.c to the new CONFIG_APP_REGISTRY symbol (nuttx side) so the lookup works under CONFIG_BUILD_KERNEL. exec_builtin.c stays on CONFIG_BUILTIN since it still dereferences builtin->main. Signed-off-by: liang.huang <liang.huang@houmo.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Companion to NuttX#19412, which splits the compile-time
name/priority/stacksize registry table (
struct builtin_s/g_builtins[]) out ofCONFIG_BUILTINinto a new hidden symbol,CONFIG_APP_REGISTRY(
default y if BUILTIN || BUILD_KERNEL).This PR switches
builtin/Make.defsandnshlib/nsh_fileapps.cfromCONFIG_BUILTINtoCONFIG_APP_REGISTRY, sonsh_fileapp()can apply an app's configured priority/stacksizevia
posix_spawn()underCONFIG_BUILD_KERNEL.exec_builtin.cstays onCONFIG_BUILTIN.Must be merged after apache/nuttx# —
CONFIG_APP_REGISTRYdoesn'texist on
nuttxmasteryet; merging this first would dropapps/builtinout of thebuild even for existing
CONFIG_BUILTIN=yconfigs.Testing
See NuttX#19412 for full before/after logs (
rv-virt,knsh_romfs,modified
examples/hello). Also re-verifiedrv-virt:nsh(CONFIG_BUILTIN=y, noCONFIG_BUILD_KERNEL) is unaffected.