Lines Matching refs:new_thread
761 struct k_thread *new_thread; in need_swap()
764 new_thread = _kernel.ready_q.cache; in need_swap()
765 return new_thread != arch_current_thread(); in need_swap()
836 static inline void set_current(struct k_thread *new_thread) in set_current() argument
839 arch_current_thread_set(new_thread); in set_current()
881 struct k_thread *old_thread = arch_current_thread(), *new_thread; in z_get_next_switch_handle() local
886 new_thread = next_up(); in z_get_next_switch_handle()
888 z_sched_usage_switch(new_thread); in z_get_next_switch_handle()
890 if (old_thread != new_thread) { in z_get_next_switch_handle()
893 update_metairq_preempt(new_thread); in z_get_next_switch_handle()
894 z_sched_switch_spin(new_thread); in z_get_next_switch_handle()
895 arch_cohere_stacks(old_thread, interrupted, new_thread); in z_get_next_switch_handle()
899 new_thread->base.cpu = cpu_id; in z_get_next_switch_handle()
900 set_current(new_thread); in z_get_next_switch_handle()
903 z_reset_time_slice(new_thread); in z_get_next_switch_handle()
923 if ((new_thread->base.cpu_mask != -1) && in z_get_next_switch_handle()
932 ret = new_thread->switch_handle; in z_get_next_switch_handle()
935 new_thread->switch_handle = NULL; in z_get_next_switch_handle()