summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-17 13:50:59 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-17 13:50:59 +0000
commitb023c1b10ea54b6fc54f0ec747c766187c58190f (patch)
tree479fffea4db69312dd25694198a686ef226ef5fa /nuttx/include
parent925415fbda596e6da11429a72f57f2574ce50844 (diff)
downloadpx4-nuttx-b023c1b10ea54b6fc54f0ec747c766187c58190f.tar.gz
px4-nuttx-b023c1b10ea54b6fc54f0ec747c766187c58190f.tar.bz2
px4-nuttx-b023c1b10ea54b6fc54f0ec747c766187c58190f.zip
Patches 7-9 from Petteri Aimonen
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5366 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/wqueue.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/nuttx/include/nuttx/wqueue.h b/nuttx/include/nuttx/wqueue.h
index 644585c56..c509bf197 100644
--- a/nuttx/include/nuttx/wqueue.h
+++ b/nuttx/include/nuttx/wqueue.h
@@ -109,17 +109,35 @@
# endif
#endif
-/* Work queue IDs (indices). These are both zero if there is only one work
- * queue.
+/* Work queue IDs (indices):
+ *
+ * Kernel Work Queues:
+ * HPWORK: This ID of the high priority work queue that should only be used for
+ * hi-priority, time-critical, driver bottom-half functions.
+ *
+ * LPWORK: This is the ID of the low priority work queue that can be used for any
+ * purpose. if CONFIG_SCHED_LPWORK is not defined, then there is only one kernel
+ * work queue and LPWORK == HPWORK.
+ *
+ * User Work Queue:
+ * USRWORK: CONFIG_NUTTX_KERNEL and CONFIG_SCHED_USRWORK are defined, then NuttX
+ * will also support a user-accessible work queue. Otherwise, USRWORK == LPWORK.
*/
#define HPWORK 0
#ifdef CONFIG_SCHED_LPWORK
-# define LPWORK 1
+# define LPWORK (HPWORK+1)
#else
# define LPWORK HPWORK
#endif
+#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_SCHED_USRWORK)
+# warning "Feature not implemented"
+# define USRWORK (LPWORK+1)
+#else
+# define USRWORK LPWORK
+#endif
+
/****************************************************************************
* Public Types
****************************************************************************/