xen/sched: retrieve scheduler id by name
authorLuca Fancellu <luca.fancellu@arm.com>
Fri, 6 May 2022 12:00:08 +0000 (13:00 +0100)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Mon, 9 May 2022 20:32:11 +0000 (13:32 -0700)
commitd54aed35babf1da36e6b3c0715f6cd56761af3f9
tree0684bb917dc1c5046646164491815dba471baeab
parenta32769dd2469ee4aeaa6371b7a4e1e52d0e0226e
xen/sched: retrieve scheduler id by name

Add a static function to retrieve the scheduler pointer using the
scheduler name.

Add a public function to retrieve the scheduler id by the scheduler
name that makes use of the new static function.

Take the occasion to replace open coded scheduler search with the
new static function in scheduler_init.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/sched/core.c
xen/include/xen/sched.h