kernel: corrected parameter names

- applied the exact parameter names of the interface to implementation

Signed-off-by: Hess Nathan <nhess@baumer.com>
This commit is contained in:
Hess Nathan 2024-06-25 09:13:15 +02:00 committed by Anas Nashif
commit 980d3f4c4f
2 changed files with 13 additions and 13 deletions

View file

@ -502,7 +502,7 @@ static void z_thread_halt(struct k_thread *thread, k_spinlock_key_t key,
} }
void z_impl_k_thread_suspend(struct k_thread *thread) void z_impl_k_thread_suspend(k_tid_t thread)
{ {
SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_thread, suspend, thread); SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_thread, suspend, thread);
@ -524,7 +524,7 @@ void z_impl_k_thread_suspend(struct k_thread *thread)
} }
#ifdef CONFIG_USERSPACE #ifdef CONFIG_USERSPACE
static inline void z_vrfy_k_thread_suspend(struct k_thread *thread) static inline void z_vrfy_k_thread_suspend(k_tid_t thread)
{ {
K_OOPS(K_SYSCALL_OBJ(thread, K_OBJ_THREAD)); K_OOPS(K_SYSCALL_OBJ(thread, K_OBJ_THREAD));
z_impl_k_thread_suspend(thread); z_impl_k_thread_suspend(thread);
@ -532,7 +532,7 @@ static inline void z_vrfy_k_thread_suspend(struct k_thread *thread)
#include <zephyr/syscalls/k_thread_suspend_mrsh.c> #include <zephyr/syscalls/k_thread_suspend_mrsh.c>
#endif /* CONFIG_USERSPACE */ #endif /* CONFIG_USERSPACE */
void z_impl_k_thread_resume(struct k_thread *thread) void z_impl_k_thread_resume(k_tid_t thread)
{ {
SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_thread, resume, thread); SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_thread, resume, thread);
@ -553,7 +553,7 @@ void z_impl_k_thread_resume(struct k_thread *thread)
} }
#ifdef CONFIG_USERSPACE #ifdef CONFIG_USERSPACE
static inline void z_vrfy_k_thread_resume(struct k_thread *thread) static inline void z_vrfy_k_thread_resume(k_tid_t thread)
{ {
K_OOPS(K_SYSCALL_OBJ(thread, K_OBJ_THREAD)); K_OOPS(K_SYSCALL_OBJ(thread, K_OBJ_THREAD));
z_impl_k_thread_resume(thread); z_impl_k_thread_resume(thread);
@ -1215,7 +1215,7 @@ static inline int32_t z_vrfy_k_sleep(k_timeout_t timeout)
#include <zephyr/syscalls/k_sleep_mrsh.c> #include <zephyr/syscalls/k_sleep_mrsh.c>
#endif /* CONFIG_USERSPACE */ #endif /* CONFIG_USERSPACE */
int32_t z_impl_k_usleep(int us) int32_t z_impl_k_usleep(int32_t us)
{ {
int32_t ticks; int32_t ticks;
@ -1232,7 +1232,7 @@ int32_t z_impl_k_usleep(int us)
} }
#ifdef CONFIG_USERSPACE #ifdef CONFIG_USERSPACE
static inline int32_t z_vrfy_k_usleep(int us) static inline int32_t z_vrfy_k_usleep(int32_t us)
{ {
return z_impl_k_usleep(us); return z_impl_k_usleep(us);
} }
@ -1442,7 +1442,7 @@ void z_thread_abort(struct k_thread *thread)
} }
#if !defined(CONFIG_ARCH_HAS_THREAD_ABORT) #if !defined(CONFIG_ARCH_HAS_THREAD_ABORT)
void z_impl_k_thread_abort(struct k_thread *thread) void z_impl_k_thread_abort(k_tid_t thread)
{ {
SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_thread, abort, thread); SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_thread, abort, thread);

View file

@ -135,14 +135,14 @@ static inline int z_vrfy_k_thread_priority_get(k_tid_t thread)
#include <zephyr/syscalls/k_thread_priority_get_mrsh.c> #include <zephyr/syscalls/k_thread_priority_get_mrsh.c>
#endif /* CONFIG_USERSPACE */ #endif /* CONFIG_USERSPACE */
int z_impl_k_thread_name_set(struct k_thread *thread, const char *value) int z_impl_k_thread_name_set(k_tid_t thread, const char *str)
{ {
#ifdef CONFIG_THREAD_NAME #ifdef CONFIG_THREAD_NAME
if (thread == NULL) { if (thread == NULL) {
thread = _current; thread = _current;
} }
strncpy(thread->name, value, CONFIG_THREAD_MAX_NAME_LEN - 1); strncpy(thread->name, str, CONFIG_THREAD_MAX_NAME_LEN - 1);
thread->name[CONFIG_THREAD_MAX_NAME_LEN - 1] = '\0'; thread->name[CONFIG_THREAD_MAX_NAME_LEN - 1] = '\0';
SYS_PORT_TRACING_OBJ_FUNC(k_thread, name_set, thread, 0); SYS_PORT_TRACING_OBJ_FUNC(k_thread, name_set, thread, 0);
@ -150,7 +150,7 @@ int z_impl_k_thread_name_set(struct k_thread *thread, const char *value)
return 0; return 0;
#else #else
ARG_UNUSED(thread); ARG_UNUSED(thread);
ARG_UNUSED(value); ARG_UNUSED(str);
SYS_PORT_TRACING_OBJ_FUNC(k_thread, name_set, thread, -ENOSYS); SYS_PORT_TRACING_OBJ_FUNC(k_thread, name_set, thread, -ENOSYS);
@ -159,7 +159,7 @@ int z_impl_k_thread_name_set(struct k_thread *thread, const char *value)
} }
#ifdef CONFIG_USERSPACE #ifdef CONFIG_USERSPACE
static inline int z_vrfy_k_thread_name_set(struct k_thread *thread, const char *str) static inline int z_vrfy_k_thread_name_set(k_tid_t thread, const char *str)
{ {
#ifdef CONFIG_THREAD_NAME #ifdef CONFIG_THREAD_NAME
char name[CONFIG_THREAD_MAX_NAME_LEN]; char name[CONFIG_THREAD_MAX_NAME_LEN];
@ -340,7 +340,7 @@ void z_check_stack_sentinel(void)
} }
#endif /* CONFIG_STACK_SENTINEL */ #endif /* CONFIG_STACK_SENTINEL */
void z_impl_k_thread_start(struct k_thread *thread) void z_impl_k_thread_start(k_tid_t thread)
{ {
SYS_PORT_TRACING_OBJ_FUNC(k_thread, start, thread); SYS_PORT_TRACING_OBJ_FUNC(k_thread, start, thread);
@ -348,7 +348,7 @@ void z_impl_k_thread_start(struct k_thread *thread)
} }
#ifdef CONFIG_USERSPACE #ifdef CONFIG_USERSPACE
static inline void z_vrfy_k_thread_start(struct k_thread *thread) static inline void z_vrfy_k_thread_start(k_tid_t thread)
{ {
K_OOPS(K_SYSCALL_OBJ(thread, K_OBJ_THREAD)); K_OOPS(K_SYSCALL_OBJ(thread, K_OBJ_THREAD));
return z_impl_k_thread_start(thread); return z_impl_k_thread_start(thread);