From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: [PATCH 1/2] xen: export do_yield as vcpu_yield Date: Wed, 23 Jul 2014 13:05:02 +0100 Message-ID: <1406117103-10584-1-git-send-email-stefano.stabellini@eu.citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X9vJ9-000547-Ap for xen-devel@lists.xenproject.org; Wed, 23 Jul 2014 12:06:07 +0000 In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian.Campbell@citrix.com, anup.patel@linaro.org, stefano.stabellini@eu.citrix.com, george.dunlap@eu.citrix.com, julien.grall@linaro.org, JBeulich@suse.com, pranavkumar@linaro.org List-Id: xen-devel@lists.xenproject.org Signed-off-by: Stefano Stabellini CC: george.dunlap@eu.citrix.com CC: JBeulich@suse.com --- 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