|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/2] xen: export do_yield as vcpu_yield
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
CC: george.dunlap@xxxxxxxxxxxxx
CC: JBeulich@xxxxxxxx
---
xen/common/schedule.c | 10 +++++-----
xen/include/xen/sched.h | 1 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index e9eb0bc..6631dc8 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -795,9 +795,8 @@ static long do_poll(struct sched_poll *sched_poll)
}
/* Voluntarily yield the processor for this allocation. */
-static long do_yield(void)
+void vcpu_yield(struct vcpu *v)
{
- struct vcpu * v=current;
spinlock_t *lock = vcpu_schedule_lock_irq(v);
SCHED_OP(VCPU2OP(v), yield, v);
@@ -805,7 +804,6 @@ static long do_yield(void)
TRACE_2D(TRC_SCHED_YIELD, current->domain->domain_id, current->vcpu_id);
raise_softirq(SCHEDULE_SOFTIRQ);
- return 0;
}
static void domain_watchdog_timeout(void *data)
@@ -888,7 +886,8 @@ long do_sched_op_compat(int cmd, unsigned long arg)
{
case SCHEDOP_yield:
{
- ret = do_yield();
+ vcpu_yield(current);
+ ret = 0;
break;
}
@@ -925,7 +924,8 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
{
case SCHEDOP_yield:
{
- ret = do_yield();
+ vcpu_yield(current);
+ ret = 0;
break;
}
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 2f876f5..b99a8d3 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -634,6 +634,7 @@ int sched_id(void);
void sched_tick_suspend(void);
void sched_tick_resume(void);
void vcpu_wake(struct vcpu *v);
+void vcpu_yield(struct vcpu *v);
void vcpu_sleep_nosync(struct vcpu *v);
void vcpu_sleep_sync(struct vcpu *v);
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |