kernel: thread: move thread states to header
Move state string defines into thread header. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
f5435b3df7
commit
8a88cd4805
|
@ -12,6 +12,16 @@
|
|||
#include <kernel_internal.h>
|
||||
#include <timeout_q.h>
|
||||
|
||||
|
||||
#define Z_STATE_STR_DUMMY "dummy"
|
||||
#define Z_STATE_STR_PENDING "pending"
|
||||
#define Z_STATE_STR_PRESTART "prestart"
|
||||
#define Z_STATE_STR_DEAD "dead"
|
||||
#define Z_STATE_STR_SUSPENDED "suspended"
|
||||
#define Z_STATE_STR_ABORTING "aborting"
|
||||
#define Z_STATE_STR_SUSPENDING "suspending"
|
||||
#define Z_STATE_STR_QUEUED "queued"
|
||||
|
||||
#ifdef CONFIG_THREAD_MONITOR
|
||||
/* This lock protects the linked list of active threads; i.e. the
|
||||
* initial _kernel.threads pointer and the linked list made up of
|
||||
|
|
|
@ -219,15 +219,6 @@ static size_t copy_bytes(char *dest, size_t dest_size, const char *src, size_t s
|
|||
return bytes_to_copy;
|
||||
}
|
||||
|
||||
#define Z_STATE_STR_DUMMY "dummy"
|
||||
#define Z_STATE_STR_PENDING "pending"
|
||||
#define Z_STATE_STR_PRESTART "prestart"
|
||||
#define Z_STATE_STR_DEAD "dead"
|
||||
#define Z_STATE_STR_SUSPENDED "suspended"
|
||||
#define Z_STATE_STR_ABORTING "aborting"
|
||||
#define Z_STATE_STR_SUSPENDING "suspending"
|
||||
#define Z_STATE_STR_QUEUED "queued"
|
||||
|
||||
const char *k_thread_state_str(k_tid_t thread_id, char *buf, size_t buf_size)
|
||||
{
|
||||
size_t off = 0;
|
||||
|
|
Loading…
Reference in a new issue