kernel: thread: move k_thread_priority_get

Move to thread.c alongside all other thread calls.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2024-03-28 07:23:25 -04:00
parent 5c170c7046
commit f5435b3df7
2 changed files with 14 additions and 14 deletions

View file

@ -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 <syscalls/k_thread_priority_get_mrsh.c>
#endif /* CONFIG_USERSPACE */
void z_impl_k_thread_priority_set(k_tid_t thread, int prio)
{
/*

View file

@ -121,6 +121,20 @@ static inline int z_vrfy_k_is_preempt_thread(void)
#include <syscalls/k_is_preempt_thread_mrsh.c>
#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 <syscalls/k_thread_priority_get_mrsh.c>
#endif /* CONFIG_USERSPACE */
int z_impl_k_thread_name_set(struct k_thread *thread, const char *value)
{
#ifdef CONFIG_THREAD_NAME