mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
wqueue: update wqueue to support using wqueue before wqueue start
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
@@ -73,13 +73,23 @@
|
||||
#if defined(CONFIG_SCHED_HPWORK)
|
||||
/* The state of the kernel mode, high priority work queue(s). */
|
||||
|
||||
struct hp_wqueue_s g_hpwork;
|
||||
struct hp_wqueue_s g_hpwork =
|
||||
{
|
||||
{},
|
||||
NXSEM_INITIALIZER(0, SEM_PRIO_NONE),
|
||||
};
|
||||
|
||||
#endif /* CONFIG_SCHED_HPWORK */
|
||||
|
||||
#if defined(CONFIG_SCHED_LPWORK)
|
||||
/* The state of the kernel mode, low priority work queue(s). */
|
||||
|
||||
struct lp_wqueue_s g_lpwork;
|
||||
struct lp_wqueue_s g_lpwork =
|
||||
{
|
||||
{},
|
||||
NXSEM_INITIALIZER(0, SEM_PRIO_NONE),
|
||||
};
|
||||
|
||||
#endif /* CONFIG_SCHED_LPWORK */
|
||||
|
||||
/****************************************************************************
|
||||
@@ -203,9 +213,6 @@ static int work_thread_create(FAR const char *name, int priority,
|
||||
argv[0] = args;
|
||||
argv[1] = NULL;
|
||||
|
||||
nxsem_init(&wqueue->sem, 0, 0);
|
||||
nxsem_set_protocol(&wqueue->sem, SEM_PRIO_NONE);
|
||||
|
||||
/* Don't permit any of the threads to run until we have fully initialized
|
||||
* g_hpwork and g_lpwork.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user