From b9a9873c2e97a765c5136b223bf8921f3bd40c66 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Sun, 6 Feb 2011 16:07:27 +0000 Subject: cpupool: Check for memory allocation failure on switching schedulers When switching schedulers on a physical cpu due to a cpupool operation check for a potential memory allocation failure and stop the operation gracefully. Signed-off-by: Juergen Gross --- xen/include/xen/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xen/include/xen/sched.h') diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index c5def0b03f..ce45800dbe 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -607,7 +607,7 @@ struct scheduler; struct scheduler *scheduler_get_default(void); struct scheduler *scheduler_alloc(unsigned int sched_id, int *perr); void scheduler_free(struct scheduler *sched); -void schedule_cpu_switch(unsigned int cpu, struct cpupool *c); +int schedule_cpu_switch(unsigned int cpu, struct cpupool *c); void vcpu_force_reschedule(struct vcpu *v); int cpu_disable_scheduler(unsigned int cpu); int vcpu_set_affinity(struct vcpu *v, cpumask_t *affinity); -- cgit v1.2.3