summaryrefslogtreecommitdiff
path: root/kernel/include
diff options
context:
space:
mode:
authorBenjamin Walsh <walsh.benj@gmail.com>2017-01-22 13:05:08 -0500
committerAnas Nashif <nashif@linux.intel.com>2017-01-24 13:34:50 +0000
commited240f27968beffdf7e9d68f2a17db6272c29357 (patch)
treeb1ea2c3c16d6a0d1e6b09b7ba2cfde907a944fec /kernel/include
parent4b655024486bf0b39328e04c9fc1a5d1ff986207 (diff)
kernel/arch: streamline thread user options
The K_<thread option> flags/options avaialble to users were hidden in the kernel private header files: move them to include/kernel.h to publicize them. Also, to avoid any future confusion, rename the k_thread.execution_flags field to user_options. Change-Id: I65a6fd5e9e78d4ccf783f3304b607a1e6956aeac Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
Diffstat (limited to 'kernel/include')
-rw-r--r--kernel/include/kernel_offsets.h2
-rw-r--r--kernel/include/kernel_structs.h17
-rw-r--r--kernel/include/offsets_short.h4
3 files changed, 6 insertions, 17 deletions
diff --git a/kernel/include/kernel_offsets.h b/kernel/include/kernel_offsets.h
index 18651d054..7513aa64d 100644
--- a/kernel/include/kernel_offsets.h
+++ b/kernel/include/kernel_offsets.h
@@ -38,7 +38,7 @@ GEN_OFFSET_SYM(_kernel_t, current_fp);
GEN_ABSOLUTE_SYM(_STRUCT_KERNEL_SIZE, sizeof(struct _kernel));
-GEN_OFFSET_SYM(_thread_base_t, execution_flags);
+GEN_OFFSET_SYM(_thread_base_t, user_options);
GEN_OFFSET_SYM(_thread_base_t, thread_state);
GEN_OFFSET_SYM(_thread_base_t, prio);
GEN_OFFSET_SYM(_thread_base_t, sched_locked);
diff --git a/kernel/include/kernel_structs.h b/kernel/include/kernel_structs.h
index e391af09e..174bac845 100644
--- a/kernel/include/kernel_structs.h
+++ b/kernel/include/kernel_structs.h
@@ -15,7 +15,7 @@
#endif
/*
- * bitmask definitions for the execution_flags and state
+ * Bitmask definitions for the struct k_thread.thread_state field.
*
* Must be before kerneL_arch_data.h because it might need them to be already
* defined.
@@ -42,17 +42,6 @@
/* 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 << 1)
-#endif
-/* end - execution flags */
-
/* lowest value of _thread_base.preempt at which a thread is non-preemptible */
#define _NON_PREEMPT_THRESHOLD 0x0080
@@ -78,8 +67,8 @@ struct _thread_base {
/* this thread's entry in a ready/wait queue */
sys_dnode_t k_q_node;
- /* execution flags */
- uint8_t execution_flags;
+ /* user facing 'thread options'; values defined in include/kernel.h */
+ uint8_t user_options;
/* thread state */
uint8_t thread_state;
diff --git a/kernel/include/offsets_short.h b/kernel/include/offsets_short.h
index 38716fff6..ac73d1547 100644
--- a/kernel/include/offsets_short.h
+++ b/kernel/include/offsets_short.h
@@ -46,8 +46,8 @@
#define _thread_offset_to_thread_state \
(___thread_t_base_OFFSET + ___thread_base_t_thread_state_OFFSET)
-#define _thread_offset_to_execution_flags \
- (___thread_t_base_OFFSET + ___thread_base_t_execution_flags_OFFSET)
+#define _thread_offset_to_user_options \
+ (___thread_t_base_OFFSET + ___thread_base_t_user_options_OFFSET)
#define _thread_offset_to_prio \
(___thread_t_base_OFFSET + ___thread_base_t_prio_OFFSET)