mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
core: rename thread_state_t to thread_status_t
This way it can't come to name collisions on `native` with Mac OSX' threading library [1]. [1]: https://opensource.apple.com/source/xnu/xnu-792/osfmk/mach/thread_status.h.auto.html
This commit is contained in:
parent
6a78746471
commit
db20a057ae
@ -114,7 +114,7 @@ typedef enum {
|
||||
STATUS_RUNNING, /**< currently running */
|
||||
STATUS_PENDING, /**< waiting to be scheduled to run */
|
||||
STATUS_NUMOF /**< number of supported thread states */
|
||||
} thread_state_t;
|
||||
} thread_status_t;
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
@ -123,7 +123,7 @@ typedef enum {
|
||||
*/
|
||||
#define STATUS_ON_RUNQUEUE STATUS_RUNNING /**< to check if on run queue:
|
||||
`st >= STATUS_ON_RUNQUEUE` */
|
||||
#define STATUS_NOT_FOUND ((thread_state_t)-1) /**< Describes an illegal thread status */
|
||||
#define STATUS_NOT_FOUND ((thread_status_t)-1) /**< Describes an illegal thread status */
|
||||
/** @} */
|
||||
/**
|
||||
* @def SCHED_PRIO_LEVELS
|
||||
@ -146,7 +146,7 @@ int sched_run(void);
|
||||
* targeted process
|
||||
* @param[in] status The new status of this thread
|
||||
*/
|
||||
void sched_set_status(thread_t *process, thread_state_t status);
|
||||
void sched_set_status(thread_t *process, thread_status_t status);
|
||||
|
||||
/**
|
||||
* @brief Yield if approriate.
|
||||
|
@ -143,7 +143,7 @@ typedef void *(*thread_task_func_t)(void *arg);
|
||||
*/
|
||||
struct _thread {
|
||||
char *sp; /**< thread's stack pointer */
|
||||
thread_state_t status; /**< thread's status */
|
||||
thread_status_t status; /**< thread's status */
|
||||
uint8_t priority; /**< thread's priority */
|
||||
|
||||
kernel_pid_t pid; /**< thread's process id */
|
||||
|
@ -158,7 +158,7 @@ void sched_register_cb(void (*callback)(uint32_t, uint32_t))
|
||||
}
|
||||
#endif
|
||||
|
||||
void sched_set_status(thread_t *process, thread_state_t status)
|
||||
void sched_set_status(thread_t *process, thread_status_t status)
|
||||
{
|
||||
if (status >= STATUS_ON_RUNQUEUE) {
|
||||
if (!(process->status >= STATUS_ON_RUNQUEUE)) {
|
||||
|
@ -96,7 +96,7 @@ void ps(void)
|
||||
thread_t *p = (thread_t *)sched_threads[i];
|
||||
|
||||
if (p != NULL) {
|
||||
thread_state_t state = p->status; /* copy state */
|
||||
thread_status_t state = p->status; /* copy state */
|
||||
const char *sname = state_names[state]; /* get state name */
|
||||
const char *queued = &queued_name[(int)(state >= STATUS_ON_RUNQUEUE)]; /* get queued flag */
|
||||
#ifdef DEVELHELP
|
||||
|
Loading…
Reference in New Issue
Block a user