idle.c (5b47b5766b21a59bb247488b374e62c3b72639fb) idle.c (b2f7d7507982ed56d301ba0f75f040fd1e930214)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Generic entry points for the idle threads and
4 * implementation of the idle task scheduling class.
5 *
6 * (NOTE: these are not related to SCHED_IDLE batch scheduled
7 * tasks which are handled in sched/fair.c )
8 */

--- 387 unchanged lines hidden (view full) ---

396{
397 return WARN_ON_ONCE(1);
398}
399#endif
400
401/*
402 * Idle tasks are unconditionally rescheduled:
403 */
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Generic entry points for the idle threads and
4 * implementation of the idle task scheduling class.
5 *
6 * (NOTE: these are not related to SCHED_IDLE batch scheduled
7 * tasks which are handled in sched/fair.c )
8 */

--- 387 unchanged lines hidden (view full) ---

396{
397 return WARN_ON_ONCE(1);
398}
399#endif
400
401/*
402 * Idle tasks are unconditionally rescheduled:
403 */
404static void check_preempt_curr_idle(struct rq *rq, struct task_struct *p, int flags)
404static void wakeup_preempt_idle(struct rq *rq, struct task_struct *p, int flags)
405{
406 resched_curr(rq);
407}
408
409static void put_prev_task_idle(struct rq *rq, struct task_struct *prev)
410{
411}
412

--- 64 unchanged lines hidden (view full) ---

477 */
478DEFINE_SCHED_CLASS(idle) = {
479
480 /* no enqueue/yield_task for idle tasks */
481
482 /* dequeue is not valid, we print a debug message there: */
483 .dequeue_task = dequeue_task_idle,
484
405{
406 resched_curr(rq);
407}
408
409static void put_prev_task_idle(struct rq *rq, struct task_struct *prev)
410{
411}
412

--- 64 unchanged lines hidden (view full) ---

477 */
478DEFINE_SCHED_CLASS(idle) = {
479
480 /* no enqueue/yield_task for idle tasks */
481
482 /* dequeue is not valid, we print a debug message there: */
483 .dequeue_task = dequeue_task_idle,
484
485 .check_preempt_curr = check_preempt_curr_idle,
485 .wakeup_preempt = wakeup_preempt_idle,
486
487 .pick_next_task = pick_next_task_idle,
488 .put_prev_task = put_prev_task_idle,
489 .set_next_task = set_next_task_idle,
490
491#ifdef CONFIG_SMP
492 .balance = balance_idle,
493 .pick_task = pick_task_idle,
494 .select_task_rq = select_task_rq_idle,
495 .set_cpus_allowed = set_cpus_allowed_common,
496#endif
497
498 .task_tick = task_tick_idle,
499
500 .prio_changed = prio_changed_idle,
501 .switched_to = switched_to_idle,
502 .update_curr = update_curr_idle,
503};
486
487 .pick_next_task = pick_next_task_idle,
488 .put_prev_task = put_prev_task_idle,
489 .set_next_task = set_next_task_idle,
490
491#ifdef CONFIG_SMP
492 .balance = balance_idle,
493 .pick_task = pick_task_idle,
494 .select_task_rq = select_task_rq_idle,
495 .set_cpus_allowed = set_cpus_allowed_common,
496#endif
497
498 .task_tick = task_tick_idle,
499
500 .prio_changed = prio_changed_idle,
501 .switched_to = switched_to_idle,
502 .update_curr = update_curr_idle,
503};