mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 03:53:33 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user