diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c index 4ff7570d0bf..d1e2fd05285 100644 --- a/fs/procfs/fs_procfsproc.c +++ b/fs/procfs/fs_procfsproc.c @@ -683,7 +683,7 @@ static ssize_t proc_cmdline(FAR struct proc_file_s *procfile, /* Show the task / thread argument list (skipping over the name) */ - linesize = group_argvstr(tcb, procfile->line, remaining); + linesize = nxtask_argvstr(tcb, procfile->line, remaining); copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining, &offset); totalsize += copysize; diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index df954ae7ccb..cfca51e5fce 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -1210,7 +1210,7 @@ pid_t nxtask_start_fork(FAR struct task_tcb_s *child); void nxtask_abort_fork(FAR struct task_tcb_s *child, int errcode); /**************************************************************************** - * Name: group_argvstr + * Name: nxtask_argvstr * * Description: * Safely read the contents of a task's argument vector, into a a safe @@ -1226,7 +1226,7 @@ void nxtask_abort_fork(FAR struct task_tcb_s *child, int errcode); * ****************************************************************************/ -size_t group_argvstr(FAR struct tcb_s *tcb, FAR char *args, size_t size); +size_t nxtask_argvstr(FAR struct tcb_s *tcb, FAR char *args, size_t size); /**************************************************************************** * Name: group_exitinfo diff --git a/sched/group/CMakeLists.txt b/sched/group/CMakeLists.txt index d613cf143b2..cec78f23513 100644 --- a/sched/group/CMakeLists.txt +++ b/sched/group/CMakeLists.txt @@ -28,8 +28,7 @@ set(SRCS group_setuptaskfiles.c group_foreachchild.c group_killchildren.c - group_signal.c - group_argvstr.c) + group_signal.c) if(CONFIG_SCHED_HAVE_PARENT) if(CONFIG_SCHED_CHILD_STATUS) diff --git a/sched/group/Make.defs b/sched/group/Make.defs index bf55c320c5e..61f0a03ec9a 100644 --- a/sched/group/Make.defs +++ b/sched/group/Make.defs @@ -23,7 +23,6 @@ CSRCS += group_create.c group_join.c group_leave.c CSRCS += group_setupidlefiles.c group_setuptaskfiles.c CSRCS += group_foreachchild.c group_killchildren.c group_signal.c -CSRCS += group_argvstr.c ifeq ($(CONFIG_SCHED_HAVE_PARENT),y) ifeq ($(CONFIG_SCHED_CHILD_STATUS),y) diff --git a/sched/misc/assert.c b/sched/misc/assert.c index e7b4fccf791..c52f23df901 100644 --- a/sched/misc/assert.c +++ b/sched/misc/assert.c @@ -365,7 +365,7 @@ static void dump_task(FAR struct tcb_s *tcb, FAR void *arg) /* Stringify the argument vector */ - group_argvstr(tcb, args, sizeof(args)); + nxtask_argvstr(tcb, args, sizeof(args)); /* get the task_state */ diff --git a/sched/task/CMakeLists.txt b/sched/task/CMakeLists.txt index b0e95e958ac..34ee0b7fc58 100644 --- a/sched/task/CMakeLists.txt +++ b/sched/task/CMakeLists.txt @@ -21,6 +21,7 @@ # ############################################################################## set(SRCS + task_argvstr.c task_create.c task_init.c task_setup.c diff --git a/sched/task/Make.defs b/sched/task/Make.defs index 5d8f2d76983..91281e556f3 100644 --- a/sched/task/Make.defs +++ b/sched/task/Make.defs @@ -20,11 +20,11 @@ # ############################################################################ -CSRCS += task_create.c task_init.c task_setup.c task_activate.c -CSRCS += task_start.c task_delete.c task_exit.c task_exithook.c -CSRCS += task_getgroup.c task_getpid.c task_prctl.c task_recover.c -CSRCS += task_restart.c task_spawnparms.c task_cancelpt.c task_terminate.c -CSRCS += task_gettid.c exit.c task_join.c +CSRCS += task_argvstr.c task_create.c task_init.c task_setup.c +CSRCS += task_activate.c task_start.c task_delete.c task_exit.c +CSRCS += task_exithook.c task_getgroup.c task_getpid.c task_prctl.c +CSRCS += task_recover.c task_restart.c task_spawnparms.c task_cancelpt.c +CSRCS += task_terminate.c task_gettid.c exit.c task_join.c ifeq ($(CONFIG_SCHED_HAVE_PARENT),y) CSRCS += task_getppid.c task_reparent.c diff --git a/sched/group/group_argvstr.c b/sched/task/task_argvstr.c similarity index 94% rename from sched/group/group_argvstr.c rename to sched/task/task_argvstr.c index 16a7536182f..2da02a7c3bd 100644 --- a/sched/group/group_argvstr.c +++ b/sched/task/task_argvstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/group/group_argvstr.c + * sched/task/task_argvstr.c * * SPDX-License-Identifier: Apache-2.0 * @@ -27,7 +27,6 @@ #include #include -#include #include #include @@ -35,14 +34,13 @@ #include #include "sched/sched.h" -#include "group/group.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: group_argvstr + * Name: nxtask_argvstr * * Description: * Safely read the contents of a task's argument vector, into a a safe @@ -58,7 +56,7 @@ * ****************************************************************************/ -size_t group_argvstr(FAR struct tcb_s *tcb, FAR char *args, size_t size) +size_t nxtask_argvstr(FAR struct tcb_s *tcb, FAR char *args, size_t size) { size_t n = 0; #ifdef CONFIG_ARCH_ADDRENV