Rename CONFIG_SCHED_USRWORK to CONFIG_LIB_USRWORK

This commit is contained in:
Gregory Nutt 2014-10-11 15:59:40 -06:00
parent 9292e3d9de
commit b78fe7c270
21 changed files with 57 additions and 57 deletions

View File

@ -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
};

View File

@ -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

View File

@ -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
};

View File

@ -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

View File

@ -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
};

View File

@ -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

View File

@ -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
};

View File

@ -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

View File

@ -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
};

View File

@ -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
};

View File

@ -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 */

View File

@ -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

View File

@ -33,7 +33,7 @@
#
############################################################################
ifeq ($(CONFIG_SCHED_USRWORK),y)
ifeq ($(CONFIG_LIB_USRWORK),y)
# Add the work queue C files to the build

View File

@ -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__ */

View File

@ -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__*/

View File

@ -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__ */

View File

@ -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__ */

View File

@ -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, &param);
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__*/

View File

@ -47,7 +47,7 @@
#include <nuttx/wqueue.h>
#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 */

View File

@ -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

View File

@ -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);