summaryrefslogtreecommitdiff
path: root/nuttx/include/sched.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-28 23:45:56 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-28 23:45:56 +0000
commit129dd27cc4deb042d2f88c65927adc49c338756d (patch)
tree265b6617c9f2281815f2c2120a571fb98ce7c883 /nuttx/include/sched.h
parentcbade4e74a17aa881e8031b6785657d7166dd819 (diff)
downloadpx4-nuttx-129dd27cc4deb042d2f88c65927adc49c338756d.tar.gz
px4-nuttx-129dd27cc4deb042d2f88c65927adc49c338756d.tar.bz2
px4-nuttx-129dd27cc4deb042d2f88c65927adc49c338756d.zip
Still working toward clean 8051 link
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@25 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/sched.h')
-rw-r--r--nuttx/include/sched.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/nuttx/include/sched.h b/nuttx/include/sched.h
index 79d3b2f1d..feb1785e3 100644
--- a/nuttx/include/sched.h
+++ b/nuttx/include/sched.h
@@ -102,9 +102,13 @@ typedef enum tstate_e
TSTATE_TASK_INACTIVE = 4, /* BLOCKED - Initialized but not yet activated */
TSTATE_WAIT_SEM = 5, /* BLOCKED - Waiting for a semaphore */
+#ifndef CONFIG_DISABLE_MQUEUE
TSTATE_WAIT_SIG = 6, /* BLOCKED - Waiting for a signal */
- TSTATE_WAIT_MQNOTEMPTY = 7, /* BLOCKED - Waiting for a MQ to become not empty. */
- TSTATE_WAIT_MQNOTFULL = 8 /* BLOCKED - Waiting for a MQ to become not full. */
+#endif
+#ifndef CONFIG_DISABLE_MQUEUE
+ TSTATE_WAIT_MQNOTEMPTY, /* BLOCKED - Waiting for a MQ to become not empty. */
+ TSTATE_WAIT_MQNOTFULL /* BLOCKED - Waiting for a MQ to become not full. */
+#endif
};
typedef enum tstate_e tstate_t;
@@ -113,8 +117,22 @@ typedef enum tstate_e tstate_t;
#define FIRST_READY_TO_RUN_STATE TSTATE_TASK_READYTORUN
#define LAST_READY_TO_RUN_STATE TSTATE_TASK_RUNNING
#define FIRST_BLOCKED_STATE TSTATE_TASK_INACTIVE
-#define LAST_BLOCKED_STATE TSTATE_WAIT_MQNOTFULL
-#define NUM_TASK_STATES 9
+#ifndef CONFIG_DISABLE_MQUEUE
+# define LAST_BLOCKED_STATE TSTATE_WAIT_MQNOTFULL
+# ifndef CONFIG_DISABLE_SIGNALS
+# define NUM_TASK_STATES 9
+# else
+# define NUM_TASK_STATES 8
+# endif
+#else
+# ifndef CONFIG_DISABLE_SIGNALS
+# define LAST_BLOCKED_STATE TSTATE_WAIT_SIG
+# define NUM_TASK_STATES 7
+# else
+# define LAST_BLOCKED_STATE TSTATE_WAIT_SEM
+# define NUM_TASK_STATES 6
+# endif
+#endif
/* The following is the form of a thread start-up function */
@@ -192,6 +210,7 @@ struct _TCB
/* POSIX Signal Control Fields **************************************/
+#ifndef CONFIG_DISABLE_SIGNALS
sigset_t sigprocmask; /* Signals that are blocked */
sigset_t sigwaitmask; /* Waiting for pending signals */
sq_queue_t sigactionq; /* List of actions for signals */
@@ -199,11 +218,14 @@ struct _TCB
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 */
+#endif
/* 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 *******************************************/