Browse Source
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>pull/69889/head
4 changed files with 86 additions and 90 deletions
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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_ */ |
Loading…
Reference in new issue