kernel/arch: streamline thread flag bits used
Use least significant bits for common flags and high bits for arch-specific ones. Change-Id: I982719de4a24d3588c19a0d30bbe7a27d9a99f13 Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
e6a69cae54
commit
d779f3d240
|
@ -50,10 +50,10 @@ extern "C" {
|
|||
/* nios2 bitmask definitions for the struct k_thread->flags bit field */
|
||||
|
||||
/* 1 = executing context is interrupt handler */
|
||||
#define INT_ACTIVE (1 << 1)
|
||||
#define INT_ACTIVE (1 << 31)
|
||||
|
||||
/* 1 = executing context is exception handler */
|
||||
#define EXC_ACTIVE (1 << 2)
|
||||
#define EXC_ACTIVE (1 << 30)
|
||||
|
||||
/* stacks */
|
||||
|
||||
|
|
|
@ -55,16 +55,16 @@
|
|||
/* x86 Bitmask definitions for the struct k_thread->flags bit field */
|
||||
|
||||
/* executing context is interrupt handler */
|
||||
#define INT_ACTIVE (1 << 1)
|
||||
#define INT_ACTIVE (1 << 31)
|
||||
|
||||
/* executing context is exception handler */
|
||||
#define EXC_ACTIVE (1 << 2)
|
||||
#define EXC_ACTIVE (1 << 30)
|
||||
|
||||
#define INT_OR_EXC_MASK (INT_ACTIVE | EXC_ACTIVE)
|
||||
|
||||
#if defined(CONFIG_FP_SHARING) && defined(CONFIG_SSE)
|
||||
/* thread uses SSEx (and also FP) registers */
|
||||
#define K_SSE_REGS (1 << 5)
|
||||
#define K_SSE_REGS (1 << 29)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FP_SHARING) && defined(CONFIG_SSE)
|
||||
|
|
|
@ -31,31 +31,31 @@
|
|||
*/
|
||||
|
||||
/* thread is defined statically */
|
||||
#define K_STATIC (1 << 8)
|
||||
#define K_STATIC (1 << 0)
|
||||
|
||||
/* Thread is waiting on an object */
|
||||
#define K_PENDING (1 << 13)
|
||||
#define K_PENDING (1 << 1)
|
||||
|
||||
/* Thread has not yet started */
|
||||
#define K_PRESTART (1 << 14)
|
||||
#define K_PRESTART (1 << 2)
|
||||
|
||||
/* Thread has terminated */
|
||||
#define K_DEAD (1 << 15)
|
||||
#define K_DEAD (1 << 3)
|
||||
|
||||
/* Thread is suspended */
|
||||
#define K_SUSPENDED (1 << 16)
|
||||
#define K_SUSPENDED (1 << 4)
|
||||
|
||||
/* Not a real thread */
|
||||
#define K_DUMMY (1 << 17)
|
||||
#define K_DUMMY (1 << 5)
|
||||
|
||||
/* system thread that must not abort */
|
||||
#define K_ESSENTIAL (1 << 6)
|
||||
|
||||
#if defined(CONFIG_FP_SHARING)
|
||||
/* thread uses floating point registers */
|
||||
#define K_FP_REGS (1 << 4)
|
||||
#define K_FP_REGS (1 << 7)
|
||||
#endif
|
||||
|
||||
/* system thread that must not abort */
|
||||
#define K_ESSENTIAL (1 << 9)
|
||||
|
||||
#include <kernel_arch_data.h>
|
||||
|
||||
#if !defined(_ASMLANGUAGE)
|
||||
|
@ -76,7 +76,7 @@ struct _thread_base {
|
|||
sys_dnode_t k_q_node;
|
||||
|
||||
/* execution flags */
|
||||
int flags;
|
||||
uint32_t flags;
|
||||
|
||||
/* thread priority used to sort linked list */
|
||||
int prio;
|
||||
|
|
Loading…
Reference in a new issue