sof/zephyr/include/rtos/init.h

21 lines
467 B
C
Raw Normal View History

/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright(c) 2023 Intel Corporation. All rights reserved.
*/
#ifndef __ZEPHYR_RTOS_INIT_H__
#define __ZEPHYR_RTOS_INIT_H__
#include <zephyr/init.h>
#define SOF_MODULE_INIT(name, init) \
static int zephyr_##name##_init(const struct device *dev) \
{ \
ARG_UNUSED(dev); \
init(); \
return 0; \
} \
SYS_INIT(zephyr_##name##_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY)
#endif /* __ZEPHYR_RTOS_INIT_H__ */