summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-02-05 19:50:37 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-02-05 19:50:37 +0000
commit0d9fb476ea6f347c48a3ac8c2d98251467421203 (patch)
treee98b731e1ff4298ed906fde23198fb4d9a9d61a9 /nuttx/include
parent70121d6ca8fd0e48f35b3ccb52e3b960e64df6c2 (diff)
downloadpx4-nuttx-0d9fb476ea6f347c48a3ac8c2d98251467421203.tar.gz
px4-nuttx-0d9fb476ea6f347c48a3ac8c2d98251467421203.tar.bz2
px4-nuttx-0d9fb476ea6f347c48a3ac8c2d98251467421203.zip
Moving pending signals to task group; Logic to recover some MQ resources on pthread_cacancel or task_delete; Now obeys rules for delivering signals to a process with threads
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5613 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/sched.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h
index 47910fabe..69ed689b8 100644
--- a/nuttx/include/nuttx/sched.h
+++ b/nuttx/include/nuttx/sched.h
@@ -73,7 +73,9 @@
# define HAVE_GROUP_MEMBERS 1
/* We need a group (but not members) if any other resources are shared within
- * a task group.
+ * a task group. NOTE: that we essentially always need a task group and that
+ * managing this definition adds a lot of overhead just to handle a corner-
+ * case very minimal system!
*/
#else
@@ -81,6 +83,8 @@
# define HAVE_TASK_GROUP 1 /* pthreads with parent*/
# elif !defined(CONFIG_DISABLE_ENVIRON)
# define HAVE_TASK_GROUP 1 /* Environment variables */
+# elif !defined(CONFIG_DISABLE_SIGNALS)
+# define HAVE_TASK_GROUP 1 /* Signals */
# elif defined(CONFIG_SCHED_ATEXIT)
# define HAVE_TASK_GROUP 1 /* Group atexit() function */
# elif defined(CONFIG_SCHED_ONEXIT)
@@ -293,13 +297,13 @@ 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 */
+ gid_t tg_gid; /* The ID of this task group */
+ gid_t tg_pgid; /* The ID of the parent task group */
#endif
#if !defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_SCHED_HAVE_PARENT)
- pid_t tg_task; /* The ID of the task within the group */
+ pid_t tg_task; /* The ID of the task within the group */
#endif
- uint8_t tg_flags; /* See GROUP_FLAG_* definitions */
+ uint8_t tg_flags; /* See GROUP_FLAG_* definitions */
/* Group membership ***********************************************************/
@@ -353,6 +357,12 @@ struct task_group_s
uint8_t tg_nkeys; /* Number pthread keys allocated */
#endif
+ /* POSIX Signal Control Fields ************************************************/
+
+#ifndef CONFIG_DISABLE_SIGNALS
+ sq_queue_t sigpendingq; /* List of pending signals */
+#endif
+
/* Environment variables ******************************************************/
#ifndef CONFIG_DISABLE_ENVIRON
@@ -471,7 +481,6 @@ struct tcb_s
sigset_t sigprocmask; /* Signals that are blocked */
sigset_t sigwaitmask; /* Waiting for pending signals */
sq_queue_t sigactionq; /* List of actions for signals */
- sq_queue_t sigpendingq; /* List of Pending Signals */
sq_queue_t sigpendactionq; /* List of pending signal actions */
sq_queue_t sigpostedq; /* List of posted signals */
siginfo_t sigunbinfo; /* Signal info when task unblocked */