Add framework to support task groups

git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5562 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2013-01-25 17:23:38 +00:00
parent b6472b58dc
commit e95efd5d2a
20 changed files with 681 additions and 145 deletions
+5 -5
View File
@@ -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);