From 5785340e0455b07c26d4f93c334847aeb5755a94 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 3 Jun 2020 19:33:56 +0800 Subject: [PATCH] sched/group: Change group_kill_children's argument from task_tcb_s to tcb_s Signed-off-by: Xiang Xiao Change-Id: I8fee46e75bd192bbaa6b03db8fc4d5dd60c58b10 --- sched/group/group.h | 2 +- sched/group/group_killchildren.c | 6 +++--- sched/signal/sig_default.c | 2 +- sched/task/exit.c | 2 +- sched/task/task_restart.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sched/group/group.h b/sched/group/group.h index a16f917f2f..6323f07ae6 100644 --- a/sched/group/group.h +++ b/sched/group/group.h @@ -101,7 +101,7 @@ FAR struct task_group_s *group_findby_grpid(grpid_t grpid); FAR struct task_group_s *group_findbypid(pid_t pid); int group_foreachchild(FAR struct task_group_s *group, foreachchild_t handler, FAR void *arg); -int group_kill_children(FAR struct task_tcb_s *tcb); +int group_kill_children(FAR struct tcb_s *tcb); #ifdef CONFIG_SIG_SIGSTOP_ACTION int group_suspend_children(FAR struct tcb_s *tcb); int group_continue(FAR struct tcb_s *tcb); diff --git a/sched/group/group_killchildren.c b/sched/group/group_killchildren.c index 51beb9a74e..86a7bf94cb 100644 --- a/sched/group/group_killchildren.c +++ b/sched/group/group_killchildren.c @@ -127,7 +127,7 @@ static int group_kill_children_handler(pid_t pid, FAR void *arg) * ****************************************************************************/ -int group_kill_children(FAR struct task_tcb_s *tcb) +int group_kill_children(FAR struct tcb_s *tcb) { int ret; @@ -136,8 +136,8 @@ int group_kill_children(FAR struct task_tcb_s *tcb) */ sched_lock(); - ret = group_foreachchild(tcb->cmn.group, group_kill_children_handler, - (FAR void *)((uintptr_t)tcb->cmn.pid)); + ret = group_foreachchild(tcb->group, group_kill_children_handler, + (FAR void *)((uintptr_t)tcb->pid)); sched_unlock(); return ret; } diff --git a/sched/signal/sig_default.c b/sched/signal/sig_default.c index d53f1db7c9..28bad31b08 100644 --- a/sched/signal/sig_default.c +++ b/sched/signal/sig_default.c @@ -273,7 +273,7 @@ static void nxsig_abnormal_termination(int signo) * task group if this_task is a pthread. */ - group_kill_children((FAR struct task_tcb_s *)rtcb); + group_kill_children(rtcb); #endif #ifndef CONFIG_DISABLE_PTHREAD diff --git a/sched/task/exit.c b/sched/task/exit.c index 90c6c215e8..3d9f5ecf5e 100644 --- a/sched/task/exit.c +++ b/sched/task/exit.c @@ -83,7 +83,7 @@ void exit(int status) * exit through a different mechanism. */ - group_kill_children((FAR struct task_tcb_s *)tcb); + group_kill_children(tcb); #endif /* Perform common task termination logic. This will get called again later diff --git a/sched/task/task_restart.c b/sched/task/task_restart.c index 097a799937..8cad71ebc5 100644 --- a/sched/task/task_restart.c +++ b/sched/task/task_restart.c @@ -126,7 +126,7 @@ int task_restart(pid_t pid) /* Kill any children of this thread */ #ifdef HAVE_GROUP_MEMBERS - group_kill_children(tcb); + group_kill_children((FAR struct tcb_s *)tcb); #endif /* Remove the TCB from whatever list it is in. After this point, the TCB