mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Rename CONFIG_SCHED_USRWORK to CONFIG_LIB_USRWORK
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
ifeq ($(CONFIG_SCHED_USRWORK),y)
|
||||
ifeq ($(CONFIG_LIB_USRWORK),y)
|
||||
|
||||
# Add the work queue C files to the build
|
||||
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
@@ -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__*/
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
@@ -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__*/
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user