diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-04 16:55:38 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-04 16:55:38 +0000 |
commit | 09afe06037de8f89b2cfa4f1765be407bf1783a2 (patch) | |
tree | 06197cd080eb563e39763b8d88f285c9a2e9f632 /nuttx/sched/group_leave.c | |
parent | c94d7c870c456005b3e87d71acba8f7f9ea2b5ec (diff) | |
download | px4-nuttx-09afe06037de8f89b2cfa4f1765be407bf1783a2.tar.gz px4-nuttx-09afe06037de8f89b2cfa4f1765be407bf1783a2.tar.bz2 px4-nuttx-09afe06037de8f89b2cfa4f1765be407bf1783a2.zip |
Move list of open message queues to task group. Now message queues opened by members of the group will be closed when the last member of the group exits.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5609 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/group_leave.c')
-rw-r--r-- | nuttx/sched/group_leave.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nuttx/sched/group_leave.c b/nuttx/sched/group_leave.c index e56952a7b..30faafa4f 100644 --- a/nuttx/sched/group_leave.c +++ b/nuttx/sched/group_leave.c @@ -50,6 +50,7 @@ #include "env_internal.h" #include "pthread_internal.h" +#include "mq_internal.h" #include "group_internal.h" #ifdef HAVE_TASK_GROUP @@ -190,6 +191,12 @@ static inline void group_release(FAR struct task_group_s *group) env_release(group); #endif + /* Close message queues opened by members of the group */ + +#ifndef CONFIG_DISABLE_MQUEUE + mq_release(group); +#endif + #ifdef HAVE_GROUP_MEMBERS /* Remove the group from the list of groups */ |