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>
31 lines
649 B
C
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_ */
|