ia64/xen-unstable
changeset 8714:bcbe322d80d9
Clean up the adjdom change a little.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Tue Jan 31 17:32:24 2006 +0100 (2006-01-31) |
parents | 85b79ab1e56d |
children | 635678c0fccc |
files | xen/common/schedule.c |
line diff
1.1 --- a/xen/common/schedule.c Tue Jan 31 15:24:16 2006 +0000 1.2 +++ b/xen/common/schedule.c Tue Jan 31 17:32:24 2006 +0100 1.3 @@ -305,7 +305,7 @@ long sched_ctl(struct sched_ctl_cmd *cmd 1.4 long sched_adjdom(struct sched_adjdom_cmd *cmd) 1.5 { 1.6 struct domain *d; 1.7 - struct vcpu *v, *vme; 1.8 + struct vcpu *v; 1.9 1.10 if ( (cmd->sched_id != ops.sched_id) || 1.11 ((cmd->direction != SCHED_INFO_PUT) && 1.12 @@ -328,28 +328,25 @@ long sched_adjdom(struct sched_adjdom_cm 1.13 * lock of the CPU they are running on. This CPU could be the 1.14 * same as ours. 1.15 */ 1.16 - vme = NULL; 1.17 1.18 for_each_vcpu ( d, v ) 1.19 { 1.20 - if ( v == current ) 1.21 - vme = current; 1.22 - else 1.23 + if ( v != current ) 1.24 vcpu_pause(v); 1.25 } 1.26 1.27 - if (vme) 1.28 - vcpu_schedule_lock_irq(vme); 1.29 + if ( d == current->domain ) 1.30 + vcpu_schedule_lock_irq(current); 1.31 1.32 SCHED_OP(adjdom, d, cmd); 1.33 TRACE_1D(TRC_SCHED_ADJDOM, d->domain_id); 1.34 1.35 - if (vme) 1.36 - vcpu_schedule_unlock_irq(vme); 1.37 + if ( d == current->domain ) 1.38 + vcpu_schedule_unlock_irq(current); 1.39 1.40 for_each_vcpu ( d, v ) 1.41 { 1.42 - if ( v != vme ) 1.43 + if ( v != current ) 1.44 vcpu_unpause(v); 1.45 } 1.46