|
52 | 52 |
|
53 | 53 | #define STACK_ALIGN_SIZE 4 |
54 | 54 |
|
55 | | -/* |
56 | | - * Bitmask definitions for the struct k_thread->flags bit field |
57 | | - */ |
| 55 | +/* x86 Bitmask definitions for the struct k_thread->flags bit field */ |
58 | 56 |
|
59 | | -#define K_STATIC 0x00000800 |
60 | | - |
61 | | -#define K_READY 0x00000000 /* Thread is ready to run */ |
62 | | -#define K_TIMING 0x00001000 /* Thread is waiting on a timeout */ |
63 | | -#define K_PENDING 0x00002000 /* Thread is waiting on an object */ |
64 | | -#define K_PRESTART 0x00004000 /* Thread has not yet started */ |
65 | | -#define K_DEAD 0x00008000 /* Thread has terminated */ |
66 | | -#define K_SUSPENDED 0x00010000 /* Thread is suspended */ |
67 | | -#define K_DUMMY 0x00020000 /* Not a real thread */ |
68 | | -#define K_EXECUTION_MASK (K_TIMING | K_PENDING | K_PRESTART | \ |
69 | | - K_DEAD | K_SUSPENDED | K_DUMMY) |
70 | | - |
71 | | -#define INT_ACTIVE 0x2 /* 1 = executing context is interrupt handler */ |
72 | | -#define EXC_ACTIVE 0x4 /* 1 = executing context is exception handler */ |
73 | | -#if defined(CONFIG_FP_SHARING) |
74 | | -#define K_FP_REGS 0x10 /* 1 = thread uses floating point registers */ |
75 | | -#endif |
76 | | -#if defined(CONFIG_FP_SHARING) && defined(CONFIG_SSE) |
77 | | -#define K_SSE_REGS 0x20 /* 1 = thread uses SSEx (and also FP) registers */ |
78 | | -#endif |
79 | | -#define K_ESSENTIAL 0x200 /* 1 = system thread that must not abort */ |
80 | | -#define NO_METRICS 0x400 /* 1 = _Swap() not to update task metrics */ |
81 | | -#define NO_METRICS_BIT_OFFSET 0xa /* Bit position of NO_METRICS */ |
| 57 | +/* executing context is interrupt handler */ |
| 58 | +#define INT_ACTIVE (1 << 1) |
| 59 | + |
| 60 | +/* executing context is exception handler */ |
| 61 | +#define EXC_ACTIVE (1 << 2) |
82 | 62 |
|
83 | 63 | #define INT_OR_EXC_MASK (INT_ACTIVE | EXC_ACTIVE) |
84 | 64 |
|
| 65 | +#if defined(CONFIG_FP_SHARING) && defined(CONFIG_SSE) |
| 66 | +/* thread uses SSEx (and also FP) registers */ |
| 67 | +#define K_SSE_REGS (1 << 5) |
| 68 | +#endif |
| 69 | + |
85 | 70 | #if defined(CONFIG_FP_SHARING) && defined(CONFIG_SSE) |
86 | 71 | #define _FP_USER_MASK (K_FP_REGS | K_SSE_REGS) |
87 | 72 | #elif defined(CONFIG_FP_SHARING) |
|
0 commit comments