[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v7 1/2] xen: export do_block, add a parameter to enable local events delivery
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> --- xen/common/schedule.c | 9 +++++---- xen/include/xen/sched.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index c1cd3d0..1f41619 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -677,11 +677,12 @@ int vcpu_set_affinity(struct vcpu *v, const cpumask_t *affinity) } /* Block the currently-executing domain until a pertinent event occurs. */ -static long do_block(void) +int do_block(int event_delivery_enable) { struct vcpu *v = current; - local_event_delivery_enable(); + if ( event_delivery_enable ) + local_event_delivery_enable(); set_bit(_VPF_blocked, &v->pause_flags); /* Check for events /after/ blocking: avoids wakeup waiting race. */ @@ -870,7 +871,7 @@ long do_sched_op_compat(int cmd, unsigned long arg) case SCHEDOP_block: { - ret = do_block(); + ret = do_block(1); break; } @@ -907,7 +908,7 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) case SCHEDOP_block: { - ret = do_block(); + ret = do_block(1); break; } diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index ad971d2..23d5efd 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -690,6 +690,7 @@ static inline int vcpu_runnable(struct vcpu *v) atomic_read(&v->domain->pause_count)); } +int do_block(int event_delivery_enable); void vcpu_unblock(struct vcpu *v); void vcpu_pause(struct vcpu *v); void vcpu_pause_nosync(struct vcpu *v); -- 1.7.2.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |