sched: Move argv from tcb_s to task_info_s

argv is allocated from stack and then belong to userspace,
so task_info_s is a best location to hold this information.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2021-11-29 11:00:27 +08:00
committed by Xiang Xiao
parent 3d6a5a2d0d
commit 1af8cd4de8
12 changed files with 35 additions and 45 deletions
+1 -4
View File
@@ -635,7 +635,6 @@ static ssize_t proc_cmdline(FAR struct proc_file_s *procfile,
FAR struct tcb_s *tcb, FAR char *buffer,
size_t buflen, off_t offset)
{
FAR struct task_tcb_s *ttcb;
FAR const char *name;
FAR char **argv;
size_t remaining;
@@ -689,9 +688,7 @@ static ssize_t proc_cmdline(FAR struct proc_file_s *procfile,
/* Show the task argument list (skipping over the name) */
ttcb = (FAR struct task_tcb_s *)tcb;
for (argv = ttcb->argv + 1; *argv; argv++)
for (argv = tcb->group->tg_info->argv + 1; *argv; argv++)
{
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN,
" %s", *argv);