// SPDX-License-Identifier: GPL-2.0 /* * stop-task scheduling class. * * The stop task is the highest priority task in the system, it preempts * everything and will be preempted by nothing. * * See kernel/stop_machine.c
*/ #include"sched.h"
staticint
select_task_rq_stop(struct task_struct *p, int cpu, int flags)
{ return task_cpu(p); /* stop tasks as never migrate */
}
/* * scheduler tick hitting a task of our scheduling class. * * NOTE: This function can be called remotely by the tick offload that * goes along full dynticks. Therefore no local assumption can be made * and everything must be accessed through the @rq and @curr passed in * parameters.
*/ staticvoid task_tick_stop(struct rq *rq, struct task_struct *curr, int queued)
{
}
staticvoid switched_to_stop(struct rq *rq, struct task_struct *p)
{
BUG(); /* its impossible to change to this class */
}
staticvoid
prio_changed_stop(struct rq *rq, struct task_struct *p, int oldprio)
{
BUG(); /* how!?, what priority? */
}
staticvoid update_curr_stop(struct rq *rq)
{
}
/* * Simple, special scheduling class for the per-CPU stop tasks:
*/
DEFINE_SCHED_CLASS(stop) = {
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.