core/thread: Make thread_get inlineable
This commit is contained in:
parent
dbc128570d
commit
315cdcdb5f
@ -356,7 +356,13 @@ kernel_pid_t thread_create(char *stack,
|
|||||||
* @param[in] pid Thread to retrieve.
|
* @param[in] pid Thread to retrieve.
|
||||||
* @return `NULL` if the PID is invalid or there is no such thread.
|
* @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
|
* @brief Returns the status of a process
|
||||||
|
|||||||
@ -30,14 +30,6 @@
|
|||||||
#include "bitarithm.h"
|
#include "bitarithm.h"
|
||||||
#include "sched.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)
|
thread_status_t thread_getstatus(kernel_pid_t pid)
|
||||||
{
|
{
|
||||||
volatile thread_t *thread = thread_get(pid);
|
volatile thread_t *thread = thread_get(pid);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user