diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-25 19:15:05 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-25 19:15:05 +0000 |
commit | 80904539e63681b2dca74e3978effb17f0c071b0 (patch) | |
tree | eb49c2f705d2255cc6f05a7ee433aa87472c8a88 /nuttx/include | |
parent | e95efd5d2a08dcb62c8c635089e4fe146965db45 (diff) | |
download | px4-firmware-80904539e63681b2dca74e3978effb17f0c071b0.tar.gz px4-firmware-80904539e63681b2dca74e3978effb17f0c071b0.tar.bz2 px4-firmware-80904539e63681b2dca74e3978effb17f0c071b0.zip |
Add logic to keep track of members of a task group
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5563 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/sched.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h index 4a3bae5e4..a29f8dfeb 100644 --- a/nuttx/include/nuttx/sched.h +++ b/nuttx/include/nuttx/sched.h @@ -60,10 +60,18 @@ /* Configuration ****************************************************************/ /* Task groups currently only supported for retention of child status */ +#undef HAVE_TASK_GROUP +#undef HAVE_GROUP_MEMBERS + #if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS) -# define HAVE_TASK_GROUP 1 -#else -# undef HAVE_TASK_GROUP +# define HAVE_TASK_GROUP 1 +# define HAVE_GROUP_MEMBERS 1 +#endif + +/* In any event, we don't need group members if support for pthreads is disabled */ + +#ifdef CONFIG_PTHREADS_DISABLE +# undef HAVE_GROUP_MEMBERS #endif /* Task Management Definitins ***************************************************/ @@ -255,12 +263,18 @@ struct dspace_s #ifdef HAVE_TASK_GROUP struct task_group_s { - uint16_t tg_crefs; /* Count of threads sharing this data */ - uint8_t tg_flags; /* See GROUP_FLAG_* definitions */ + uint8_t tg_flags; /* See GROUP_FLAG_* definitions */ + uint8_t tg_nmembers; /* Number of members in the group */ +#ifdef HAVE_GROUP_MEMBERS + uint8_t tg_mxmembers; /* Number of members in allocation */ + FAR pid_t *tg_members; /* Members of the group */ +#endif /* Child exit status **********************************************************/ +#if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS) FAR struct child_status_s *tg_children; /* Head of a list of child status */ +#endif /* Environment varibles *******************************************************/ /* Not yet (see type environ_t) */ |