mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
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
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#else
|
||||
# if !defined(CONFIG_DISABLE_ENVIRON) /* Environment variales */
|
||||
# if !defined(CONFIG_DISABLE_ENVIRON) /* Environment variables */
|
||||
# define HAVE_TASK_GROUP 1
|
||||
# elif defined(CONFIG_SCHED_ATEXIT) /* Group atexit() function */
|
||||
# define HAVE_TASK_GROUP 1
|
||||
@@ -91,6 +91,8 @@
|
||||
# define HAVE_TASK_GROUP 1
|
||||
# elif CONFIG_NSOCKET_DESCRIPTORS > 0 /* Sockets */
|
||||
# define HAVE_TASK_GROUP 1
|
||||
# elif !defined(CONFIG_DISABLE_MQUEUE) /* Message queues */
|
||||
# define HAVE_TASK_GROUP 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -375,6 +377,11 @@ struct task_group_s
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
struct socketlist tg_socketlist; /* Maps socket descriptor to socket */
|
||||
#endif
|
||||
/* POSIX Named Message Queue Fields *******************************************/
|
||||
|
||||
#ifndef CONFIG_DISABLE_MQUEUE
|
||||
sq_queue_t tg_msgdesq; /* List of opened message queues */
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
@@ -488,13 +495,12 @@ struct _TCB
|
||||
/* POSIX Named Message Queue Fields *******************************************/
|
||||
|
||||
#ifndef CONFIG_DISABLE_MQUEUE
|
||||
sq_queue_t msgdesq; /* List of opened message queues */
|
||||
FAR msgq_t *msgwaitq; /* Waiting for this message queue */
|
||||
#endif
|
||||
|
||||
/* Library related fields *****************************************************/
|
||||
|
||||
int pterrno; /* Current per-thread errno */
|
||||
int pterrno; /* Current per-thread errno */
|
||||
|
||||
/* State save areas ***********************************************************/
|
||||
/* The form and content of these fields are processor-specific. */
|
||||
@@ -504,7 +510,6 @@ struct _TCB
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
char name[CONFIG_TASK_NAME_SIZE]; /* Task name */
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
/* Certain other header files may also define this time to avoid circular header
|
||||
|
||||
Reference in New Issue
Block a user