diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-07 17:11:26 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-07 17:11:26 -0600 |
commit | 1753a0251a941fa4d1a5b95aec631209e9957670 (patch) | |
tree | a2c838b70f71b98df273b75fd86c404ab1f5d4f5 /nuttx/include | |
parent | cb42882d01ad071f66f6809a49c643eb32730688 (diff) | |
download | px4-nuttx-1753a0251a941fa4d1a5b95aec631209e9957670.tar.gz px4-nuttx-1753a0251a941fa4d1a5b95aec631209e9957670.tar.bz2 px4-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')
-rw-r--r-- | nuttx/include/nuttx/wqueue.h | 27 |
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 |