From e95efd5d2a08dcb62c8c635089e4fe146965db45 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 25 Jan 2013 17:23:38 +0000 Subject: Add framework to support task groups git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5562 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/sched/task_reparent.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nuttx/sched/task_reparent.c') diff --git a/nuttx/sched/task_reparent.c b/nuttx/sched/task_reparent.c index 3a7ece37d..0b502dcce 100644 --- a/nuttx/sched/task_reparent.c +++ b/nuttx/sched/task_reparent.c @@ -138,11 +138,11 @@ int task_reparent(pid_t ppid, pid_t chpid) child = task_removechild(otcb, chpid); if (child) { - /* Has the new parent supressed child exit status? */ + /* Has the new parent's task group supressed child exit status? */ - if ((ptcb->flags && TCB_FLAG_NOCLDWAIT) == 0) + if ((ptcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0) { - /* No.. Add the child status entry to the new parent TCB */ + /* No.. Add the child status entry to the new parent's task group */ task_addchild(ptcb, child); } @@ -159,11 +159,11 @@ int task_reparent(pid_t ppid, pid_t chpid) } else { - /* This would not be an error if the original parent has + /* This would not be an error if the original parent's task group has * suppressed child exit status. */ - ret = ((otcb->flags && TCB_FLAG_NOCLDWAIT) == 0) ? -ENOENT : OK; + ret = ((otcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0) ? -ENOENT : OK; } #else DEBUGASSERT(otcb->nchildren > 0); -- cgit v1.2.3