diff --git a/core/include/thread.h b/core/include/thread.h index e3dc3ef8dc..6a1e6cfb71 100644 --- a/core/include/thread.h +++ b/core/include/thread.h @@ -356,7 +356,13 @@ kernel_pid_t thread_create(char *stack, * @param[in] pid Thread to retrieve. * @return `NULL` if the PID is invalid or there is no such thread. */ -volatile thread_t *thread_get(kernel_pid_t pid); +static inline volatile thread_t *thread_get(kernel_pid_t pid) +{ + if (pid_is_valid(pid)) { + return sched_threads[pid]; + } + return NULL; +} /** * @brief Returns the status of a process diff --git a/core/thread.c b/core/thread.c index 48bd2debbd..0c5f61f96c 100644 --- a/core/thread.c +++ b/core/thread.c @@ -30,14 +30,6 @@ #include "bitarithm.h" #include "sched.h" -volatile thread_t *thread_get(kernel_pid_t pid) -{ - if (pid_is_valid(pid)) { - return sched_threads[pid]; - } - return NULL; -} - thread_status_t thread_getstatus(kernel_pid_t pid) { volatile thread_t *thread = thread_get(pid);