kernel: move K_ESSENTIAL from thread_state to execution_flags

The execution_flags will store the user-facing states of a thread.

This also fixes a bug where K_ESSENTIAL was already assigned to
execution_flags via the options field of
k_thread_spawn()/K_THREAD_DEFINE().

Change-Id: I91ad7a62b5d180e09eead8985ff519809959ecf2
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
This commit is contained in:
Benjamin Walsh 2017-01-22 11:51:25 -05:00 committed by Anas Nashif
commit 867f8ee371
3 changed files with 11 additions and 11 deletions

View file

@ -24,8 +24,8 @@
/* states: common uses low bits, arch-specific use high bits */
/* system thread that must not abort */
#define K_ESSENTIAL (1 << 0)
/* Not a real thread */
#define _THREAD_DUMMY (1 << 0)
/* Thread is waiting on an object */
#define _THREAD_PENDING (1 << 1)
@ -39,17 +39,17 @@
/* Thread is suspended */
#define _THREAD_SUSPENDED (1 << 4)
/* Not a real thread */
#define _THREAD_DUMMY (1 << 5)
/* end - states */
/* execution flags: common uses low bits, arch-specific use high bits */
/* system thread that must not abort */
#define K_ESSENTIAL (1 << 0)
#if defined(CONFIG_FP_SHARING)
/* thread uses floating point registers */
#define K_FP_REGS (1 << 0)
#define K_FP_REGS (1 << 1)
#endif
/* end - execution flags */