summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-11 14:43:24 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-11 14:43:24 -0600
commitefab0e2ea369167c97522773dcc4e0e8213408c0 (patch)
tree2d7960b2febbf4eed3241fd9de5c6c821b3ee4a7
parent1a639251dbf599c80357c0c4661be5d0068cc0b3 (diff)
downloadpx4-nuttx-efab0e2ea369167c97522773dcc4e0e8213408c0.tar.gz
px4-nuttx-efab0e2ea369167c97522773dcc4e0e8213408c0.tar.bz2
px4-nuttx-efab0e2ea369167c97522773dcc4e0e8213408c0.zip
Make building of low-priority work queue independent of also building the high-priority work queue
-rw-r--r--nuttx/include/nuttx/wqueue.h31
-rw-r--r--nuttx/libc/Kconfig1
-rw-r--r--nuttx/sched/wqueue/wqueue.h14
3 files changed, 10 insertions, 36 deletions
diff --git a/nuttx/include/nuttx/wqueue.h b/nuttx/include/nuttx/wqueue.h
index 4de65ff68..37c5b7b5d 100644
--- a/nuttx/include/nuttx/wqueue.h
+++ b/nuttx/include/nuttx/wqueue.h
@@ -139,28 +139,9 @@
#else
/* User-space worker threads are not built in a flat build
* (CONFIG_BUILD_PROTECTED=n && CONFIG_BUILD_KERNEL=n)
- *
- * To preserve legacy behavior, CONFIG_SCHED_HPWORK is assumed to be true
- * in a flat build (CONFIG_SCHED_KERNEL=n) but must be defined in kernel
- * mode in order to build the high priority work queue.
- *
- * In the kernel build, it is possible that no kernel work queues will be
- * built. But in the flat build, the high priority work queue will always
- * be built.
*/
-# undef CONFIG_SCHED_HPWORK
# undef CONFIG_SCHED_USRWORK
-# define CONFIG_SCHED_HPWORK 1
-#endif
-
-/* We never build the low priority work queue without building the high
- * priority work queue.
- */
-
-#if defined(CONFIG_SCHED_LPWORK) && !defined(CONFIG_SCHED_HPWORK)
-# error "CONFIG_SCHED_LPWORK defined, but CONFIG_SCHED_HPWORK not defined"
-# undef CONFIG_SCHED_LPWORK
#endif
#ifdef CONFIG_SCHED_WORKQUEUE
@@ -228,12 +209,14 @@
# define CONFIG_SCHED_LPWORKSTACKSIZE CONFIG_IDLETHREAD_STACKSIZE
# endif
-/* The high priority worker thread should be higher priority than the low
- * priority worker thread.
- */
+# ifdef CONFIG_WORK_HPWORK
+ /* The high priority worker thread should be higher priority than the low
+ * priority worker thread.
+ */
-#if CONFIG_SCHED_LPWORKPRIORITY > CONFIG_SCHED_WORKPRIORITY
-# warning "The Lower priority worker thread has the higher priority"
+# if CONFIG_SCHED_LPWORKPRIORITY > CONFIG_SCHED_WORKPRIORITY
+# warning "The Lower priority worker thread has the higher priority"
+# endif
#endif
#endif /* CONFIG_SCHED_LPWORK */
diff --git a/nuttx/libc/Kconfig b/nuttx/libc/Kconfig
index 72986be0f..028c70cfa 100644
--- a/nuttx/libc/Kconfig
+++ b/nuttx/libc/Kconfig
@@ -452,7 +452,6 @@ config SCHED_WORKPERIOD
config SCHED_WORKSTACKSIZE
int "High priority worker thread stack size"
default 2048
- depends on SCHED_WORKQUEUE
---help---
The stack size allocated for the worker thread. Default: 2K.
diff --git a/nuttx/sched/wqueue/wqueue.h b/nuttx/sched/wqueue/wqueue.h
index 7b4fee28e..14bf74b44 100644
--- a/nuttx/sched/wqueue/wqueue.h
+++ b/nuttx/sched/wqueue/wqueue.h
@@ -52,18 +52,10 @@
* Pre-processor Definitions
****************************************************************************/
-/* Customize kernel thread names */
+/* Kkernel thread names */
-#ifdef CONFIG_SCHED_HPWORK
-# if defined(CONFIG_SCHED_LPWORK)
-# define HPWORKNAME "hpwork"
-# define LPWORKNAME "lpwork"
-# elif defined(CONFIG_SCHED_USRWORK)
-# define HPWORKNAME "kwork"
-# else
-# define HPWORKNAME "work"
-# endif
-#endif
+#define HPWORKNAME "hpwork"
+#define LPWORKNAME "lpwork"
/****************************************************************************
* Public Type Definitions