mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
nshlib: apply configured priority/stacksize under CONFIG_BUILD_KERNEL
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 commit is contained in:
parent
1d5f816874
commit
e64e16498a
4 changed files with 13 additions and 7 deletions
|
|
@ -20,7 +20,7 @@
|
|||
#
|
||||
# ##############################################################################
|
||||
|
||||
if(CONFIG_BUILTIN)
|
||||
if(CONFIG_APP_REGISTRY)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
|
|
@ -54,8 +54,11 @@ if(CONFIG_BUILTIN)
|
|||
|
||||
set(CSRCS)
|
||||
|
||||
list(APPEND CSRCS builtin_list.c exec_builtin.c builtin_list.h
|
||||
builtin_proto.h)
|
||||
list(APPEND CSRCS builtin_list.c builtin_list.h builtin_proto.h)
|
||||
|
||||
if(CONFIG_BUILTIN)
|
||||
list(APPEND CSRCS exec_builtin.c)
|
||||
endif()
|
||||
|
||||
# target_sources(apps PRIVATE ${CSRCS})
|
||||
nuttx_add_library(apps_builtin ${CSRCS})
|
||||
|
|
|
|||
|
|
@ -20,6 +20,6 @@
|
|||
#
|
||||
############################################################################
|
||||
|
||||
ifneq ($(CONFIG_BUILTIN),)
|
||||
ifneq ($(CONFIG_APP_REGISTRY),)
|
||||
CONFIGURED_APPS += $(APPDIR)/builtin
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@ include $(APPDIR)/Make.defs
|
|||
|
||||
# Source and object files
|
||||
|
||||
CSRCS = builtin_list.c exec_builtin.c
|
||||
CSRCS = builtin_list.c
|
||||
ifeq ($(CONFIG_BUILTIN),y)
|
||||
CSRCS += exec_builtin.c
|
||||
endif
|
||||
|
||||
# Registry entry lists
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
|
|||
pid_t pid;
|
||||
int rc = 0;
|
||||
int ret;
|
||||
#ifdef CONFIG_BUILTIN
|
||||
#ifdef CONFIG_APP_REGISTRY
|
||||
FAR char *appname;
|
||||
int index;
|
||||
#endif
|
||||
|
|
@ -212,7 +212,7 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BUILTIN
|
||||
#ifdef CONFIG_APP_REGISTRY
|
||||
/* Check if a builtin application with this name exists */
|
||||
|
||||
appname = basename((FAR char *)cmd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue