Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel: corrected parameter names #74924

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,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);

Expand All @@ -516,15 +516,15 @@ void z_impl_k_thread_suspend(struct k_thread *thread)
}

#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));
z_impl_k_thread_suspend(thread);
}
#include <syscalls/k_thread_suspend_mrsh.c>
#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);

Expand All @@ -545,7 +545,7 @@ void z_impl_k_thread_resume(struct k_thread *thread)
}

#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));
z_impl_k_thread_resume(thread);
Expand Down Expand Up @@ -1176,7 +1176,7 @@ static inline int32_t z_vrfy_k_sleep(k_timeout_t timeout)
#include <syscalls/k_sleep_mrsh.c>
#endif /* CONFIG_USERSPACE */

int32_t z_impl_k_usleep(int us)
int32_t z_impl_k_usleep(int32_t us)
{
int32_t ticks;

Expand All @@ -1193,7 +1193,7 @@ int32_t z_impl_k_usleep(int us)
}

#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);
}
Expand Down Expand Up @@ -1403,7 +1403,7 @@ void z_thread_abort(struct k_thread *thread)
}

#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);

Expand Down
12 changes: 6 additions & 6 deletions kernel/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,22 +135,22 @@ static inline int z_vrfy_k_thread_priority_get(k_tid_t 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)
int z_impl_k_thread_name_set(k_tid_t thread, const char *str)
{
#ifdef CONFIG_THREAD_NAME
if (thread == NULL) {
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';

SYS_PORT_TRACING_OBJ_FUNC(k_thread, name_set, thread, 0);

return 0;
#else
ARG_UNUSED(thread);
ARG_UNUSED(value);
ARG_UNUSED(str);

SYS_PORT_TRACING_OBJ_FUNC(k_thread, name_set, thread, -ENOSYS);

Expand All @@ -159,7 +159,7 @@ int z_impl_k_thread_name_set(struct k_thread *thread, const char *value)
}

#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
char name[CONFIG_THREAD_MAX_NAME_LEN];
Expand Down Expand Up @@ -340,15 +340,15 @@ void z_check_stack_sentinel(void)
}
#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);

z_sched_start(thread);
}

#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));
return z_impl_k_thread_start(thread);
Expand Down
Loading