File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -86,12 +86,16 @@ const size_t _kernel_thread_info_offsets[] = {
8686 [THREAD_INFO_OFFSET_T_STACK_PTR ] = offsetof(struct k_thread ,
8787 callee_saved .thread_status ),
8888#elif defined(CONFIG_XTENSA )
89- /* Xtensa does not store stack pointers inside thread objects.
90- * The registers are saved in thread stack where there is
91- * no fixed location for this to work. So mark this as
92- * unimplemented to avoid the #warning below.
93- */
89+ /* Xtensa does not store stack pointers inside thread objects.
90+ * The registers are saved in thread stack where there is
91+ * no fixed location for this to work. It needs arch_switch in
92+ * order to work on Xtensa.
93+ */
94+ #ifdef CONFIG_USE_SWITCH
95+ [THREAD_INFO_OFFSET_T_STACK_PTR ] = offsetof(struct k_thread , switch_handle ),
96+ #else
9497 [THREAD_INFO_OFFSET_T_STACK_PTR ] = THREAD_INFO_UNIMPLEMENTED ,
98+ #endif
9599#elif defined(CONFIG_RX )
96100 /* RX doesn't store *anything* inside thread objects yet */
97101 [THREAD_INFO_OFFSET_T_STACK_PTR ] = THREAD_INFO_UNIMPLEMENTED ,
You can’t perform that action at this time.
0 commit comments