2016-11-05 03:47:32 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Wind River Systems, Inc.
|
|
|
|
* Copyright (c) 2016 Intel Corporation
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-11-05 03:47:32 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* System workqueue.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <kernel.h>
|
|
|
|
#include <init.h>
|
|
|
|
|
2017-06-03 03:56:47 +08:00
|
|
|
K_THREAD_STACK_DEFINE(sys_work_q_stack, CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE);
|
2016-11-05 03:47:32 +08:00
|
|
|
|
|
|
|
struct k_work_q k_sys_work_q;
|
|
|
|
|
|
|
|
static int k_sys_work_q_init(struct device *dev)
|
|
|
|
{
|
|
|
|
ARG_UNUSED(dev);
|
|
|
|
|
|
|
|
k_work_q_start(&k_sys_work_q,
|
|
|
|
sys_work_q_stack,
|
2017-06-03 03:56:47 +08:00
|
|
|
K_THREAD_STACK_SIZEOF(sys_work_q_stack),
|
2016-11-05 03:47:32 +08:00
|
|
|
CONFIG_SYSTEM_WORKQUEUE_PRIORITY);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2016-12-17 07:01:13 +08:00
|
|
|
SYS_INIT(k_sys_work_q_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|