mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user