1 /* 2 * Copyright (c) 2020 Nordic Semiconductor ASA 3 * Copyright (c) 2018 Intel Corporation 4 * Copyright (c) 2016 Wind River Systems, Inc. 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 */ 8 9 #include <zephyr/kernel.h> 10 #include <zephyr/init.h> 11 #include <usb_work_q.h> 12 13 K_KERNEL_STACK_DEFINE(z_usb_work_q_stack, CONFIG_USB_WORKQUEUE_STACK_SIZE); 14 15 struct k_work_q z_usb_work_q; 16 z_usb_work_q_init(void)17static int z_usb_work_q_init(void) 18 { 19 20 k_work_queue_start(&z_usb_work_q, 21 z_usb_work_q_stack, 22 K_KERNEL_STACK_SIZEOF(z_usb_work_q_stack), 23 CONFIG_USB_WORKQUEUE_PRIORITY, NULL); 24 k_thread_name_set(&z_usb_work_q.thread, "usbworkq"); 25 26 return 0; 27 } 28 29 SYS_INIT(z_usb_work_q_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); 30