1
0
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:
JulianHolzwarth 2019-10-15 15:48:27 +02:00
parent c9b76a9585
commit fbf6a665e1
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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)