diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-26 17:28:20 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-26 17:28:20 +0000 |
commit | a1aa13f62853491f8bd96a3dea0f0427fa83ad05 (patch) | |
tree | 86bcd215a785d7499f6472475df1c6c879574751 /nuttx/include | |
parent | 239e2808cca6ee4c356d087bc83889fc57e64307 (diff) | |
download | px4-firmware-a1aa13f62853491f8bd96a3dea0f0427fa83ad05.tar.gz px4-firmware-a1aa13f62853491f8bd96a3dea0f0427fa83ad05.tar.bz2 px4-firmware-a1aa13f62853491f8bd96a3dea0f0427fa83ad05.zip |
Don't keep the parent task's task ID in the child task's TCB. Instead, keep the parent task group IN the child task's task group.
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5566 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/sched.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h index dd33b4570..8ebb7db4c 100644 --- a/nuttx/include/nuttx/sched.h +++ b/nuttx/include/nuttx/sched.h @@ -95,6 +95,7 @@ #define TCB_FLAG_NONCANCELABLE (1 << 2) /* Bit 2: Pthread is non-cancelable */ #define TCB_FLAG_CANCEL_PENDING (1 << 3) /* Bit 3: Pthread cancel is pending */ #define TCB_FLAG_ROUND_ROBIN (1 << 4) /* Bit 4: Round robin sched enabled */ +#define TCB_FLAG_EXIT_PROCESSING (1 << 5) /* Bit 5: Exitting */ /* Values for struct task_group tg_flags */ @@ -253,6 +254,11 @@ struct dspace_s #ifdef HAVE_TASK_GROUP struct task_group_s { +#ifdef HAVE_GROUP_MEMBERS + struct task_group_s *flink; /* Supports a singly linked list */ + gid_t tg_gid; /* The ID of this task group */ + gid_t tg_pgid; /* The ID of the parent task group */ +#endif uint8_t tg_flags; /* See GROUP_FLAG_* definitions */ /* Group membership ***********************************************************/ @@ -311,12 +317,16 @@ struct _TCB /* Task Management Fields *****************************************************/ pid_t pid; /* This is the ID of the thread */ + #ifdef CONFIG_SCHED_HAVE_PARENT /* Support parent-child relationship */ - pid_t parent; /* This is the ID of the parent thread */ +#ifndef HAVE_GROUP_MEMBERS /* Don't know pids of group members */ + pid_t ppid; /* This is the ID of the parent thread */ #ifndef CONFIG_SCHED_CHILD_STATUS /* Retain child thread status */ uint16_t nchildren; /* This is the number active children */ #endif #endif +#endif /* CONFIG_SCHED_HAVE_PARENT */ + start_t start; /* Thread start function */ entry_t entry; /* Entry Point into the thread */ |