File tree Expand file tree Collapse file tree 2 files changed +28
-25
lines changed
Expand file tree Collapse file tree 2 files changed +28
-25
lines changed Original file line number Diff line number Diff line change @@ -235,30 +235,6 @@ static inline void z_swap_unlocked(void)
235235 *
236236 * The memory of the dummy thread can be completely uninitialized.
237237 */
238- static inline void z_dummy_thread_init (struct k_thread * dummy_thread )
239- {
240- dummy_thread -> base .thread_state = _THREAD_DUMMY ;
241- #ifdef CONFIG_SCHED_CPU_MASK
242- dummy_thread -> base .cpu_mask = -1 ;
243- #endif /* CONFIG_SCHED_CPU_MASK */
244- dummy_thread -> base .user_options = K_ESSENTIAL ;
245- #ifdef CONFIG_THREAD_STACK_INFO
246- dummy_thread -> stack_info .start = 0U ;
247- dummy_thread -> stack_info .size = 0U ;
248- #endif /* CONFIG_THREAD_STACK_INFO */
249- #ifdef CONFIG_USERSPACE
250- dummy_thread -> mem_domain_info .mem_domain = & k_mem_domain_default ;
251- #endif /* CONFIG_USERSPACE */
252- #if (K_HEAP_MEM_POOL_SIZE > 0 )
253- k_thread_system_pool_assign (dummy_thread );
254- #else
255- dummy_thread -> resource_pool = NULL ;
256- #endif /* K_HEAP_MEM_POOL_SIZE */
238+ void z_dummy_thread_init (struct k_thread * dummy_thread );
257239
258- #ifdef CONFIG_TIMESLICE_PER_THREAD
259- dummy_thread -> base .slice_ticks = 0 ;
260- #endif /* CONFIG_TIMESLICE_PER_THREAD */
261-
262- z_current_thread_set (dummy_thread );
263- }
264240#endif /* ZEPHYR_KERNEL_INCLUDE_KSWAP_H_ */
Original file line number Diff line number Diff line change @@ -1123,3 +1123,30 @@ void k_thread_abort_cleanup_check_reuse(struct k_thread *thread)
11231123}
11241124
11251125#endif /* CONFIG_THREAD_ABORT_NEED_CLEANUP */
1126+
1127+ void z_dummy_thread_init (struct k_thread * dummy_thread )
1128+ {
1129+ dummy_thread -> base .thread_state = _THREAD_DUMMY ;
1130+ #ifdef CONFIG_SCHED_CPU_MASK
1131+ dummy_thread -> base .cpu_mask = -1 ;
1132+ #endif /* CONFIG_SCHED_CPU_MASK */
1133+ dummy_thread -> base .user_options = K_ESSENTIAL ;
1134+ #ifdef CONFIG_THREAD_STACK_INFO
1135+ dummy_thread -> stack_info .start = 0U ;
1136+ dummy_thread -> stack_info .size = 0U ;
1137+ #endif /* CONFIG_THREAD_STACK_INFO */
1138+ #ifdef CONFIG_USERSPACE
1139+ dummy_thread -> mem_domain_info .mem_domain = & k_mem_domain_default ;
1140+ #endif /* CONFIG_USERSPACE */
1141+ #if (K_HEAP_MEM_POOL_SIZE > 0 )
1142+ k_thread_system_pool_assign (dummy_thread );
1143+ #else
1144+ dummy_thread -> resource_pool = NULL ;
1145+ #endif /* K_HEAP_MEM_POOL_SIZE */
1146+
1147+ #ifdef CONFIG_TIMESLICE_PER_THREAD
1148+ dummy_thread -> base .slice_ticks = 0 ;
1149+ #endif /* CONFIG_TIMESLICE_PER_THREAD */
1150+
1151+ z_current_thread_set (dummy_thread );
1152+ }
You can’t perform that action at this time.
0 commit comments