summaryrefslogtreecommitdiff
path: root/nuttx/include/nuttx/wqueue.h
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-10 16:24:50 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-10 16:24:50 -0600
commit9780f68188ae4466d6d57d307fc31766b811a988 (patch)
tree4678bad855da2538e3cbd9256c6333c3de082a5a /nuttx/include/nuttx/wqueue.h
parent59702ad149099f5da9fc0fa434b3beeecd6e78e7 (diff)
downloadnuttx-9780f68188ae4466d6d57d307fc31766b811a988.tar.gz
nuttx-9780f68188ae4466d6d57d307fc31766b811a988.tar.bz2
nuttx-9780f68188ae4466d6d57d307fc31766b811a988.zip
Add support for multiple low-priority worker threads
Diffstat (limited to 'nuttx/include/nuttx/wqueue.h')
-rw-r--r--nuttx/include/nuttx/wqueue.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/nuttx/include/nuttx/wqueue.h b/nuttx/include/nuttx/wqueue.h
index b2d51cb0f..4de65ff68 100644
--- a/nuttx/include/nuttx/wqueue.h
+++ b/nuttx/include/nuttx/wqueue.h
@@ -82,6 +82,8 @@
* then an additional, lower-priority work queue will also be created. This
* lower priority work queue is better suited for more extended processing
* (such as file system clean-up operations)
+ * CONFIG_SCHED_LPNTHREADS - The number of thread in the low-priority queue's
+ * thread pool. Default: 1
* CONFIG_SCHED_LPWORKPRIORITY - The minimum execution priority of the lower
* priority worker thread. Default: 50
* CONFIG_SCHED_LPWORKPRIOMAX - The maximum execution priority of the lower
@@ -189,6 +191,10 @@
#ifdef CONFIG_SCHED_LPWORK
+# ifndef CONFIG_SCHED_LPNTHREADS
+# define CONFIG_SCHED_LPNTHREADS 1
+#endif
+
# ifndef CONFIG_SCHED_LPWORKPRIORITY
# define CONFIG_SCHED_LPWORKPRIORITY 50
# endif
@@ -293,18 +299,6 @@
#ifndef __ASSEMBLY__
-/* This structure defines the state on one work queue. This structure is
- * used internally by the OS and worker queue logic and should not be
- * accessed by application logic.
- */
-
-struct wqueue_s
-{
- uint32_t delay; /* Delay between polling cycles (ticks) */
- struct dq_queue_s q; /* The queue of pending work */
- pid_t pid[1]; /* The task ID of the worker thread(s) */
-};
-
/* Defines the work callback */
typedef void (*worker_t)(FAR void *arg);