Lines Matching refs:to_thread
238 struct rt_thread *to_thread; in rt_system_scheduler_start() local
241 to_thread = _scheduler_get_highest_priority_thread(&highest_ready_priority); in rt_system_scheduler_start()
243 rt_cpu_self()->current_thread = to_thread; in rt_system_scheduler_start()
248 rt_sched_remove_thread(to_thread); in rt_system_scheduler_start()
249 RT_SCHED_CTX(to_thread).stat = RT_THREAD_RUNNING; in rt_system_scheduler_start()
253 rt_hw_context_switch_to((rt_uintptr_t)&to_thread->sp); in rt_system_scheduler_start()
282 struct rt_thread *to_thread; in rt_schedule() local
300 to_thread = _scheduler_get_highest_priority_thread(&highest_ready_priority); in rt_schedule()
306 to_thread = curr_thread; in rt_schedule()
311 to_thread = curr_thread; in rt_schedule()
319 if (to_thread != curr_thread) in rt_schedule()
324 rt_cpu_self()->current_thread = to_thread; in rt_schedule()
326 RT_OBJECT_HOOK_CALL(rt_scheduler_hook, (from_thread, to_thread)); in rt_schedule()
338 rt_sched_remove_thread(to_thread); in rt_schedule()
339 …RT_SCHED_CTX(to_thread).stat = RT_THREAD_RUNNING | (RT_SCHED_CTX(to_thread).stat & ~RT_THREAD_STAT… in rt_schedule()
346 RT_NAME_MAX, to_thread->parent.name, to_thread->sp, in rt_schedule()
349 RT_SCHEDULER_STACK_CHECK(to_thread); in rt_schedule()
358 (rt_uintptr_t)&to_thread->sp); in rt_schedule()
389 (rt_uintptr_t)&to_thread->sp, from_thread, to_thread); in rt_schedule()