Lines Matching refs:ctl

41 	struct sched_control *ctl = &per_cpu(sched_ctl, pcpu_id);  in obtain_schedule_lock()  local
42 spinlock_irqsave_obtain(&ctl->scheduler_lock, rflag); in obtain_schedule_lock()
47 struct sched_control *ctl = &per_cpu(sched_ctl, pcpu_id); in release_schedule_lock() local
48 spinlock_irqrestore_release(&ctl->scheduler_lock, rflag); in release_schedule_lock()
53 struct sched_control *ctl = &per_cpu(sched_ctl, pcpu_id); in get_scheduler() local
54 return ctl->scheduler; in get_scheduler()
67 struct sched_control *ctl = &per_cpu(sched_ctl, pcpu_id); in init_sched() local
72 spinlock_init(&ctl->scheduler_lock); in init_sched()
73 ctl->flags = 0UL; in init_sched()
74 ctl->curr_obj = NULL; in init_sched()
75 ctl->pcpu_id = pcpu_id; in init_sched()
77 ctl->scheduler = &sched_noop; in init_sched()
80 ctl->scheduler = &sched_iorr; in init_sched()
83 ctl->scheduler = &sched_bvt; in init_sched()
86 ctl->scheduler = &sched_prio; in init_sched()
88 if (ctl->scheduler->init != NULL) { in init_sched()
89 ctl->scheduler->init(ctl); in init_sched()
95 struct sched_control *ctl = &per_cpu(sched_ctl, pcpu_id); in deinit_sched() local
97 if (ctl->scheduler->deinit != NULL) { in deinit_sched()
98 ctl->scheduler->deinit(ctl); in deinit_sched()
104 struct sched_control *ctl = &per_cpu(sched_ctl, BSP_CPU_ID); in suspend_sched() local
106 if (ctl->scheduler->suspend != NULL) { in suspend_sched()
107 ctl->scheduler->suspend(ctl); in suspend_sched()
113 struct sched_control *ctl = &per_cpu(sched_ctl, BSP_CPU_ID); in resume_sched() local
115 if (ctl->scheduler->resume != NULL) { in resume_sched()
116 ctl->scheduler->resume(ctl); in resume_sched()
145 struct sched_control *ctl = &per_cpu(sched_ctl, pcpu_id); in sched_get_current() local
146 return ctl->curr_obj; in sched_get_current()
154 struct sched_control *ctl = &per_cpu(sched_ctl, pcpu_id); in make_reschedule_request() local
156 bitmap_set_lock(NEED_RESCHEDULE, &ctl->flags); in make_reschedule_request()
164 struct sched_control *ctl = &per_cpu(sched_ctl, pcpu_id); in need_reschedule() local
166 return bitmap_test(NEED_RESCHEDULE, &ctl->flags); in need_reschedule()
172 struct sched_control *ctl = &per_cpu(sched_ctl, pcpu_id); in schedule() local
174 struct thread_object *prev = ctl->curr_obj; in schedule()
179 if (ctl->scheduler->pick_next != NULL) { in schedule()
180 next = ctl->scheduler->pick_next(ctl); in schedule()
182 bitmap_clear_lock(NEED_RESCHEDULE, &ctl->flags); in schedule()
203 ctl->curr_obj = next; in schedule()