Make building of low-priority work queue independent of also building the high-priority work queue
This commit is contained in:
parent
5671ebeab3
commit
bb1d91bd83
@ -139,28 +139,9 @@
|
|||||||
#else
|
#else
|
||||||
/* User-space worker threads are not built in a flat build
|
/* User-space worker threads are not built in a flat build
|
||||||
* (CONFIG_BUILD_PROTECTED=n && CONFIG_BUILD_KERNEL=n)
|
* (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
|
# 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
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_WORKQUEUE
|
#ifdef CONFIG_SCHED_WORKQUEUE
|
||||||
@ -228,12 +209,14 @@
|
|||||||
# define CONFIG_SCHED_LPWORKSTACKSIZE CONFIG_IDLETHREAD_STACKSIZE
|
# define CONFIG_SCHED_LPWORKSTACKSIZE CONFIG_IDLETHREAD_STACKSIZE
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* The high priority worker thread should be higher priority than the low
|
# ifdef CONFIG_WORK_HPWORK
|
||||||
* priority worker thread.
|
/* The high priority worker thread should be higher priority than the low
|
||||||
*/
|
* priority worker thread.
|
||||||
|
*/
|
||||||
|
|
||||||
#if CONFIG_SCHED_LPWORKPRIORITY > CONFIG_SCHED_WORKPRIORITY
|
# if CONFIG_SCHED_LPWORKPRIORITY > CONFIG_SCHED_WORKPRIORITY
|
||||||
# warning "The Lower priority worker thread has the higher priority"
|
# warning "The Lower priority worker thread has the higher priority"
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CONFIG_SCHED_LPWORK */
|
#endif /* CONFIG_SCHED_LPWORK */
|
||||||
|
@ -452,7 +452,6 @@ config SCHED_WORKPERIOD
|
|||||||
config SCHED_WORKSTACKSIZE
|
config SCHED_WORKSTACKSIZE
|
||||||
int "High priority worker thread stack size"
|
int "High priority worker thread stack size"
|
||||||
default 2048
|
default 2048
|
||||||
depends on SCHED_WORKQUEUE
|
|
||||||
---help---
|
---help---
|
||||||
The stack size allocated for the worker thread. Default: 2K.
|
The stack size allocated for the worker thread. Default: 2K.
|
||||||
|
|
||||||
|
@ -52,18 +52,10 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Customize kernel thread names */
|
/* Kkernel thread names */
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_HPWORK
|
#define HPWORKNAME "hpwork"
|
||||||
# if defined(CONFIG_SCHED_LPWORK)
|
#define LPWORKNAME "lpwork"
|
||||||
# define HPWORKNAME "hpwork"
|
|
||||||
# define LPWORKNAME "lpwork"
|
|
||||||
# elif defined(CONFIG_SCHED_USRWORK)
|
|
||||||
# define HPWORKNAME "kwork"
|
|
||||||
# else
|
|
||||||
# define HPWORKNAME "work"
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Type Definitions
|
* Public Type Definitions
|
||||||
|
Loading…
Reference in New Issue
Block a user