From f5435b3df7a8cdcbb1809ae952967b985c7baaf3 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Thu, 28 Mar 2024 07:23:25 -0400 Subject: [PATCH] kernel: thread: move k_thread_priority_get Move to thread.c alongside all other thread calls. Signed-off-by: Anas Nashif --- kernel/sched.c | 14 -------------- kernel/thread.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/kernel/sched.c b/kernel/sched.c index 2ea7531f582..c7bfbd1ddcb 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1025,20 +1025,6 @@ void z_sched_init(void) #endif /* CONFIG_SCHED_CPU_MASK_PIN_ONLY */ } -int z_impl_k_thread_priority_get(k_tid_t thread) -{ - return thread->base.prio; -} - -#ifdef CONFIG_USERSPACE -static inline int z_vrfy_k_thread_priority_get(k_tid_t thread) -{ - K_OOPS(K_SYSCALL_OBJ(thread, K_OBJ_THREAD)); - return z_impl_k_thread_priority_get(thread); -} -#include -#endif /* CONFIG_USERSPACE */ - void z_impl_k_thread_priority_set(k_tid_t thread, int prio) { /* diff --git a/kernel/thread.c b/kernel/thread.c index 23deffff42a..f87744ebed8 100644 --- a/kernel/thread.c +++ b/kernel/thread.c @@ -121,6 +121,20 @@ static inline int z_vrfy_k_is_preempt_thread(void) #include #endif /* CONFIG_USERSPACE */ +int z_impl_k_thread_priority_get(k_tid_t thread) +{ + return thread->base.prio; +} + +#ifdef CONFIG_USERSPACE +static inline int z_vrfy_k_thread_priority_get(k_tid_t thread) +{ + K_OOPS(K_SYSCALL_OBJ(thread, K_OBJ_THREAD)); + return z_impl_k_thread_priority_get(thread); +} +#include +#endif /* CONFIG_USERSPACE */ + int z_impl_k_thread_name_set(struct k_thread *thread, const char *value) { #ifdef CONFIG_THREAD_NAME