zephyr/kernel/include/kthread.h
Anas Nashif 3ca50f5060 kernel: move z_init_static_threads to where it is being used
Move out of thread and put directly in init.c where it is being used.
Also remove definition from kernel.h, this is an internal function and
should not be in a public header.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 19:27:28 -05:00

31 lines
649 B
C

/*
* Copyright (c) 2016-2017 Wind River Systems, Inc.
* Copyright (c) 2024 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_KERNEL_INCLUDE_THREAD_H_
#define ZEPHYR_KERNEL_INCLUDE_THREAD_H_
#include <zephyr/kernel.h>
#include <timeout_q.h>
#ifdef CONFIG_MULTITHREADING
static inline void thread_schedule_new(struct k_thread *thread, k_timeout_t delay)
{
#ifdef CONFIG_SYS_CLOCK_EXISTS
if (K_TIMEOUT_EQ(delay, K_NO_WAIT)) {
k_thread_start(thread);
} else {
z_add_thread_timeout(thread, delay);
}
#else
ARG_UNUSED(delay);
k_thread_start(thread);
#endif
}
#endif
#endif /* ZEPHYR_KERNEL_INCLUDE_THREAD_H_ */