diff --git a/configs/mikroe-stm32f4/kernel/up_userspace.c b/configs/mikroe-stm32f4/kernel/up_userspace.c index b70a4e80a61..372d5302a09 100644 --- a/configs/mikroe-stm32f4/kernel/up_userspace.c +++ b/configs/mikroe-stm32f4/kernel/up_userspace.c @@ -130,7 +130,7 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = /* User-space work queue support (declared in include/nuttx/wqueue.h) */ -#ifdef CONFIG_SCHED_USRWORK +#ifdef CONFIG_LIB_USRWORK .work_usrstart = work_usrstart, #endif }; diff --git a/configs/mikroe-stm32f4/kostest/defconfig b/configs/mikroe-stm32f4/kostest/defconfig index ccddb67d743..1a48d8b3562 100644 --- a/configs/mikroe-stm32f4/kostest/defconfig +++ b/configs/mikroe-stm32f4/kostest/defconfig @@ -818,7 +818,7 @@ CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=20000 CONFIG_SCHED_WORKSTACKSIZE=2048 # CONFIG_SCHED_LPWORK is not set -# CONFIG_SCHED_USRWORK is not set +# CONFIG_LIB_USRWORK is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set diff --git a/configs/open1788/kernel/up_userspace.c b/configs/open1788/kernel/up_userspace.c index 29864ae1060..a003fae3a6b 100644 --- a/configs/open1788/kernel/up_userspace.c +++ b/configs/open1788/kernel/up_userspace.c @@ -130,7 +130,7 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = /* User-space work queue support (declared in include/nuttx/wqueue.h) */ -#ifdef CONFIG_SCHED_USRWORK +#ifdef CONFIG_LIB_USRWORK .work_usrstart = work_usrstart, #endif }; diff --git a/configs/open1788/knsh/defconfig b/configs/open1788/knsh/defconfig index 9776666fdf9..262eb279303 100644 --- a/configs/open1788/knsh/defconfig +++ b/configs/open1788/knsh/defconfig @@ -594,7 +594,7 @@ CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 # CONFIG_SCHED_LPWORK is not set -# CONFIG_SCHED_USRWORK is not set +# CONFIG_LIB_USRWORK is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set diff --git a/configs/sam3u-ek/kernel/up_userspace.c b/configs/sam3u-ek/kernel/up_userspace.c index c9e07a1b031..db65b58e1a4 100644 --- a/configs/sam3u-ek/kernel/up_userspace.c +++ b/configs/sam3u-ek/kernel/up_userspace.c @@ -130,7 +130,7 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = /* User-space work queue support (declared in include/nuttx/wqueue.h) */ -#ifdef CONFIG_SCHED_USRWORK +#ifdef CONFIG_LIB_USRWORK .work_usrstart = work_usrstart, #endif }; diff --git a/configs/sam3u-ek/knsh/defconfig b/configs/sam3u-ek/knsh/defconfig index 754e103b124..4d58e15b40c 100644 --- a/configs/sam3u-ek/knsh/defconfig +++ b/configs/sam3u-ek/knsh/defconfig @@ -600,7 +600,7 @@ CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 # CONFIG_SCHED_LPWORK is not set -# CONFIG_SCHED_USRWORK is not set +# CONFIG_LIB_USRWORK is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set diff --git a/configs/stm3240g-eval/kernel/up_userspace.c b/configs/stm3240g-eval/kernel/up_userspace.c index 8a68a70e20c..4d7b8e225a8 100644 --- a/configs/stm3240g-eval/kernel/up_userspace.c +++ b/configs/stm3240g-eval/kernel/up_userspace.c @@ -130,7 +130,7 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = /* User-space work queue support (declared in include/nuttx/wqueue.h) */ -#ifdef CONFIG_SCHED_USRWORK +#ifdef CONFIG_LIB_USRWORK .work_usrstart = work_usrstart, #endif }; diff --git a/configs/stm3240g-eval/knxwm/defconfig b/configs/stm3240g-eval/knxwm/defconfig index a52f645ccf5..546fe334d34 100644 --- a/configs/stm3240g-eval/knxwm/defconfig +++ b/configs/stm3240g-eval/knxwm/defconfig @@ -870,7 +870,7 @@ CONFIG_SCHED_WORKSTACKSIZE=2048 CONFIG_SCHED_LPWORKPRIORITY=50 CONFIG_SCHED_LPWORKPERIOD=50000 CONFIG_SCHED_LPWORKSTACKSIZE=2048 -CONFIG_SCHED_USRWORK=y +CONFIG_LIB_USRWORK=y # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set diff --git a/configs/stm32f4discovery/kernel/up_userspace.c b/configs/stm32f4discovery/kernel/up_userspace.c index 0c5d7548df9..47d3d83279d 100644 --- a/configs/stm32f4discovery/kernel/up_userspace.c +++ b/configs/stm32f4discovery/kernel/up_userspace.c @@ -131,7 +131,7 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = /* User-space work queue support (declared in include/nuttx/wqueue.h) */ -#ifdef CONFIG_SCHED_USRWORK +#ifdef CONFIG_LIB_USRWORK .work_usrstart = work_usrstart, #endif }; diff --git a/include/nuttx/userspace.h b/include/nuttx/userspace.h index ce47a90cdcb..db21e967df1 100644 --- a/include/nuttx/userspace.h +++ b/include/nuttx/userspace.h @@ -149,7 +149,7 @@ struct userspace_s /* User-space work queue support */ -#ifdef CONFIG_SCHED_USRWORK +#ifdef CONFIG_LIB_USRWORK int (*work_usrstart)(void); #endif }; diff --git a/include/nuttx/wqueue.h b/include/nuttx/wqueue.h index e55bdd20b58..363a0ae2ac0 100644 --- a/include/nuttx/wqueue.h +++ b/include/nuttx/wqueue.h @@ -98,13 +98,13 @@ * builds. This those configurations, the user-mode work queue provides the * same (non-standard) facility for use by applications. * - * CONFIG_SCHED_USRWORK. If CONFIG_SCHED_USRWORK is also defined then the + * CONFIG_LIB_USRWORK. If CONFIG_LIB_USRWORK is also defined then the * user-mode work queue will be created. - * CONFIG_SCHED_USRWORKPRIORITY - The minimum execution priority of the lower + * CONFIG_LIB_USRWORKPRIORITY - The minimum execution priority of the lower * priority worker thread. Default: 100 - * CONFIG_SCHED_USRWORKPERIOD - How often the lower priority worker thread + * CONFIG_LIB_USRWORKPERIOD - How often the lower priority worker thread * checks for work in units of microseconds. Default: 100*1000 (100 MS). - * CONFIG_SCHED_USRWORKSTACKSIZE - The stack size allocated for the lower + * CONFIG_LIB_USRWORKSTACKSIZE - The stack size allocated for the lower * priority worker thread. Default: 2048. */ @@ -139,10 +139,10 @@ * (CONFIG_BUILD_PROTECTED=n && CONFIG_BUILD_KERNEL=n) */ -# undef CONFIG_SCHED_USRWORK +# undef CONFIG_LIB_USRWORK #endif -#if defined(CONFIG_SCHED_WORKQUEUE) || defined(CONFIG_SCHED_USRWORK) +#if defined(CONFIG_SCHED_WORKQUEUE) || defined(CONFIG_LIB_USRWORK) /* High priority, kernel work queue configuration ***************************/ @@ -221,21 +221,21 @@ /* User space work queue configuration **************************************/ -#ifdef CONFIG_SCHED_USRWORK +#ifdef CONFIG_LIB_USRWORK -# ifndef CONFIG_SCHED_USRWORKPRIORITY -# define CONFIG_SCHED_USRWORKPRIORITY 100 +# ifndef CONFIG_LIB_USRWORKPRIORITY +# define CONFIG_LIB_USRWORKPRIORITY 100 # endif -# ifndef CONFIG_SCHED_USRWORKPERIOD -# define CONFIG_SCHED_USRWORKPERIOD (100*1000) /* 100 milliseconds */ +# ifndef CONFIG_LIB_USRWORKPERIOD +# define CONFIG_LIB_USRWORKPERIOD (100*1000) /* 100 milliseconds */ # endif -# ifndef CONFIG_SCHED_USRWORKSTACKSIZE -# define CONFIG_SCHED_USRWORKSTACKSIZE CONFIG_IDLETHREAD_STACKSIZE +# ifndef CONFIG_LIB_USRWORKSTACKSIZE +# define CONFIG_LIB_USRWORKSTACKSIZE CONFIG_IDLETHREAD_STACKSIZE # endif -#endif /* CONFIG_SCHED_USRWORK */ +#endif /* CONFIG_LIB_USRWORK */ /* Work queue IDs: * @@ -254,7 +254,7 @@ * priority work queue (if there is one). */ -#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__) +#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__) /* User mode */ # define USRWORK 2 /* User mode work queue */ @@ -272,7 +272,7 @@ # endif # define USRWORK LPWORK /* Redirect user-mode references */ -#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__ +#endif /* CONFIG_LIB_USRWORK && !__KERNEL__ /**************************************************************************** * Public Types @@ -329,7 +329,7 @@ extern "C" * ****************************************************************************/ -#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__) +#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__) int work_usrstart(void); #endif @@ -469,5 +469,5 @@ void lpwork_restorepriority(uint8_t reqprio); #endif #endif /* __ASSEMBLY__ */ -#endif /* CONFIG_SCHED_WORKQUEUE || CONFIG_SCHED_USRWORK */ +#endif /* CONFIG_SCHED_WORKQUEUE || CONFIG_LIB_USRWORK */ #endif /* __INCLUDE_NUTTX_WQUEUE_H */ diff --git a/libc/Kconfig b/libc/Kconfig index 8226793f78f..d3030ef05dc 100644 --- a/libc/Kconfig +++ b/libc/Kconfig @@ -395,7 +395,7 @@ comment "Non-standard Library Support" if BUILD_PROTECTED || BUILD_KERNEL -config SCHED_USRWORK +config LIB_USRWORK bool "User mode worker thread" default n depends on !DISABLE_SIGNALS @@ -403,28 +403,28 @@ config SCHED_USRWORK User space work queues can also be made available for deferred processing in the NuttX kernel build. -if SCHED_USRWORK +if LIB_USRWORK -config SCHED_USRWORKPRIORITY +config LIB_USRWORKPRIORITY int "User mode priority worker thread priority" default 100 ---help--- The execution priority of the lopwer priority worker thread. Default: 192 -config SCHED_USRWORKPERIOD +config LIB_USRWORKPERIOD int "User mode worker thread period" default 100000 ---help--- How often the lower priority worker thread checks for work in units of microseconds. Default: 100*1000 (100 MS). -config SCHED_USRWORKSTACKSIZE +config LIB_USRWORKSTACKSIZE int "User mode worker thread stack size" default 2048 ---help--- The stack size allocated for the lower priority worker thread. Default: 2K. -endif # SCHED_USRWORK +endif # LIB_USRWORK endif # BUILD_PROTECTED config LIB_KBDCODEC diff --git a/libc/wqueue/Make.defs b/libc/wqueue/Make.defs index ae2d6d5f4d7..a22192dd6e8 100644 --- a/libc/wqueue/Make.defs +++ b/libc/wqueue/Make.defs @@ -33,7 +33,7 @@ # ############################################################################ -ifeq ($(CONFIG_SCHED_USRWORK),y) +ifeq ($(CONFIG_LIB_USRWORK),y) # Add the work queue C files to the build diff --git a/libc/wqueue/work_cancel.c b/libc/wqueue/work_cancel.c index 0db49f24650..c7b1a8435bc 100644 --- a/libc/wqueue/work_cancel.c +++ b/libc/wqueue/work_cancel.c @@ -48,7 +48,7 @@ #include "wqueue/wqueue.h" -#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__) +#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__) /**************************************************************************** * Pre-processor Definitions @@ -162,4 +162,4 @@ int work_cancel(int qid, FAR struct work_s *work) } } -#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__ */ +#endif /* CONFIG_LIB_USRWORK && !__KERNEL__ */ diff --git a/libc/wqueue/work_lock.c b/libc/wqueue/work_lock.c index 59de461bcca..d6aea231ee1 100644 --- a/libc/wqueue/work_lock.c +++ b/libc/wqueue/work_lock.c @@ -46,7 +46,7 @@ #include "wqueue/wqueue.h" -#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__) +#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__) /**************************************************************************** * Pre-processor Definitions @@ -135,4 +135,4 @@ void work_unlock(void) #endif } -#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__*/ +#endif /* CONFIG_LIB_USRWORK && !__KERNEL__*/ diff --git a/libc/wqueue/work_queue.c b/libc/wqueue/work_queue.c index 78280baac9f..ffe98af8c78 100644 --- a/libc/wqueue/work_queue.c +++ b/libc/wqueue/work_queue.c @@ -50,7 +50,7 @@ #include "wqueue/wqueue.h" -#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__) +#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__) /**************************************************************************** * Pre-processor Definitions @@ -174,4 +174,4 @@ int work_queue(int qid, FAR struct work_s *work, worker_t worker, } } -#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__ */ +#endif /* CONFIG_LIB_USRWORK && !__KERNEL__ */ diff --git a/libc/wqueue/work_signal.c b/libc/wqueue/work_signal.c index 62a29e26c32..01c492af750 100644 --- a/libc/wqueue/work_signal.c +++ b/libc/wqueue/work_signal.c @@ -46,7 +46,7 @@ #include "wqueue/wqueue.h" -#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__) +#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__) /**************************************************************************** * Pre-processor Definitions @@ -87,7 +87,7 @@ * ****************************************************************************/ -#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__) +#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__) int work_signal(int qid) { @@ -112,4 +112,4 @@ int work_signal(int qid) return ret; } -#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__ */ +#endif /* CONFIG_LIB_USRWORK && !__KERNEL__ */ diff --git a/libc/wqueue/work_usrthread.c b/libc/wqueue/work_usrthread.c index fc41837ccea..9fbe560ee13 100644 --- a/libc/wqueue/work_usrthread.c +++ b/libc/wqueue/work_usrthread.c @@ -52,7 +52,7 @@ #include "wqueue/wqueue.h" -#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__) +#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__) /**************************************************************************** * Pre-processor Definitions @@ -339,7 +339,7 @@ int work_usrstart(void) { /* Initialize work queue data structures */ - g_usrwork.delay = CONFIG_SCHED_USRWORKPERIOD / USEC_PER_TICK; + g_usrwork.delay = CONFIG_LIB_USRWORKPERIOD / USEC_PER_TICK; dq_init(&g_usrwork.q); #ifdef CONFIG_BUILD_PROTECTED @@ -351,8 +351,8 @@ int work_usrstart(void) /* Start a user-mode worker thread for use by applications. */ g_usrwork.pid = task_create("uwork", - CONFIG_SCHED_USRWORKPRIORITY, - CONFIG_SCHED_USRWORKSTACKSIZE, + CONFIG_LIB_USRWORKPRIORITY, + CONFIG_LIB_USRWORKSTACKSIZE, (main_t)work_usrthread, (FAR char * const *)NULL); @@ -380,9 +380,9 @@ int work_usrstart(void) /* Start a user-mode worker thread for use by applications. */ (void)pthread_attr_init(&attr); - (void)pthread_attr_setstacksize(&attr, CONFIG_SCHED_USRWORKSTACKSIZE); + (void)pthread_attr_setstacksize(&attr, CONFIG_LIB_USRWORKSTACKSIZE); - param.sched_priority = CONFIG_SCHED_USRWORKPRIORITY; + param.sched_priority = CONFIG_LIB_USRWORKPRIORITY; (void)pthread_attr_setschedparam(&attr, ¶m); status = pthread_create(&usrwork, &attr, work_usrthread, NULL); @@ -403,4 +403,4 @@ int work_usrstart(void) #endif } -#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__*/ +#endif /* CONFIG_LIB_USRWORK && !__KERNEL__*/ diff --git a/libc/wqueue/wqueue.h b/libc/wqueue/wqueue.h index e40a7f03713..05b6a122356 100644 --- a/libc/wqueue/wqueue.h +++ b/libc/wqueue/wqueue.h @@ -47,7 +47,7 @@ #include -#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__) +#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__) /**************************************************************************** * Pre-processor Definitions @@ -122,5 +122,5 @@ int work_lock(void); void work_unlock(void); -#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__*/ +#endif /* CONFIG_LIB_USRWORK && !__KERNEL__*/ #endif /* __LIBC_WQUEUE_WQUEUE_H */ diff --git a/sched/Kconfig b/sched/Kconfig index 641002b46ba..a0f656f4ad5 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -786,7 +786,7 @@ config SIG_SIGCONDTIMEDOUT config SIG_SIGWORK int "SIGWORK" default 17 - depends on SCHED_WORKQUEUE || SCHED_USRWORK + depends on SCHED_WORKQUEUE || LIB_USRWORK ---help--- SIGWORK is a non-standard signal used to wake up the internal NuttX worker thread. This setting specifies the signal number that will be diff --git a/sched/init/os_bringup.c b/sched/init/os_bringup.c index 09f31d2e06e..f3918ec8889 100644 --- a/sched/init/os_bringup.c +++ b/sched/init/os_bringup.c @@ -120,7 +120,7 @@ /* In the protected build (only) we also need to start the user work queue */ #if !defined(CONFIG_BUILD_PROTECTED) -# undef CONFIG_SCHED_USRWORK +# undef CONFIG_LIB_USRWORK #endif /**************************************************************************** @@ -197,7 +197,7 @@ static inline void os_pgworker(void) #ifdef CONFIG_SCHED_WORKQUEUE static inline void os_workqueues(void) { -#ifdef CONFIG_SCHED_USRWORK +#ifdef CONFIG_LIB_USRWORK pid_t pid; #endif @@ -219,7 +219,7 @@ static inline void os_workqueues(void) #endif /* CONFIG_SCHED_LPWORK */ -#ifdef CONFIG_SCHED_USRWORK +#ifdef CONFIG_LIB_USRWORK /* Start the user-space work queue */ DEBUGASSERT(USERSPACE->work_usrstart != NULL);