summaryrefslogtreecommitdiff
path: root/nuttx/include/nuttx/wqueue.h
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-07 17:11:26 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-07 17:11:26 -0600
commit1753a0251a941fa4d1a5b95aec631209e9957670 (patch)
treea2c838b70f71b98df273b75fd86c404ab1f5d4f5 /nuttx/include/nuttx/wqueue.h
parentcb42882d01ad071f66f6809a49c643eb32730688 (diff)
downloadnuttx-1753a0251a941fa4d1a5b95aec631209e9957670.tar.gz
nuttx-1753a0251a941fa4d1a5b95aec631209e9957670.tar.bz2
nuttx-1753a0251a941fa4d1a5b95aec631209e9957670.zip
Update some Kconfig comments; Add a upper limit on the lower priority worker thread for priority inheritance
Diffstat (limited to 'nuttx/include/nuttx/wqueue.h')
-rw-r--r--nuttx/include/nuttx/wqueue.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/nuttx/include/nuttx/wqueue.h b/nuttx/include/nuttx/wqueue.h
index 424373a17..036ea0da3 100644
--- a/nuttx/include/nuttx/wqueue.h
+++ b/nuttx/include/nuttx/wqueue.h
@@ -79,8 +79,10 @@
* 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_LPWORKPRIORITY - The execution priority of the lower priority
- * worker thread. Default: 50
+ * 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
+ * priority worker thread. Default: 176
* CONFIG_SCHED_LPWORKPERIOD - How often the lower priority worker thread
* checks for work in units of microseconds. Default: 50*1000 (50 MS).
* CONFIG_SCHED_LPWORKSTACKSIZE - The stack size allocated for the lower
@@ -175,6 +177,27 @@
# define CONFIG_SCHED_LPWORKPRIORITY 50
# endif
+# ifndef CONFIG_SCHED_LPWORKPRIOMAX
+# ifdef CONFIG_SCHED_HPWORK
+# define CONFIG_SCHED_LPWORKPRIOMAX (CONFIG_SCHED_WORKPRIORITY-16)
+# else
+# define CONFIG_SCHED_LPWORKPRIOMAX 176
+# endif
+# endif
+
+# ifdef CONFIG_SCHED_HPWORK
+# if CONFIG_SCHED_LPWORKPRIORITY >= CONFIG_SCHED_WORKPRIORITY
+# error CONFIG_SCHED_LPWORKPRIORITY >= CONFIG_SCHED_WORKPRIORITY
+# endif
+# if CONFIG_SCHED_LPWORKPRIOMAX >= CONFIG_SCHED_WORKPRIORITY
+# error CONFIG_SCHED_LPWORKPRIOMAX >= CONFIG_SCHED_WORKPRIORITY
+# endif
+# endif
+
+# if CONFIG_SCHED_LPWORKPRIORITY > CONFIG_SCHED_LPWORKPRIOMAX
+# error CONFIG_SCHED_LPWORKPRIORITY > CONFIG_SCHED_LPWORKPRIOMAX
+# endif
+
# ifndef CONFIG_SCHED_LPWORKPERIOD
# define CONFIG_SCHED_LPWORKPERIOD (50*1000) /* 50 milliseconds */
# endif