mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 04:52:59 +01:00
core/thread.c: change thread_getstatus return type
thread_status_t instead of int
This commit is contained in:
parent
c9b76a9585
commit
fbf6a665e1
@ -364,7 +364,7 @@ volatile thread_t *thread_get(kernel_pid_t pid);
|
||||
* @return status of the thread
|
||||
* @return `STATUS_NOT_FOUND` if pid is unknown
|
||||
*/
|
||||
int thread_getstatus(kernel_pid_t pid);
|
||||
thread_status_t thread_getstatus(kernel_pid_t pid);
|
||||
|
||||
/**
|
||||
* @brief Puts the current thread into sleep mode. Has to be woken up externally.
|
||||
|
@ -38,10 +38,10 @@ volatile thread_t *thread_get(kernel_pid_t pid)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int thread_getstatus(kernel_pid_t pid)
|
||||
thread_status_t thread_getstatus(kernel_pid_t pid)
|
||||
{
|
||||
volatile thread_t *thread = thread_get(pid);
|
||||
return thread ? (int)thread->status : (int)STATUS_NOT_FOUND;
|
||||
return thread ? thread->status : STATUS_NOT_FOUND;
|
||||
}
|
||||
|
||||
const char *thread_getname(kernel_pid_t pid)
|
||||
|
Loading…
Reference in New Issue
Block a user