From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 1/2] xen: export do_yield as vcpu_yield Date: Wed, 23 Jul 2014 14:07:37 +0100 Message-ID: <53CFB399.7070903@eu.citrix.com> References: <1406117103-10584-1-git-send-email-stefano.stabellini@eu.citrix.com> <53CFB17B.1040201@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X9wHK-0001A8-MT for xen-devel@lists.xenproject.org; Wed, 23 Jul 2014 13:08:18 +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: Stefano Stabellini Cc: Ian.Campbell@citrix.com, anup.patel@linaro.org, julien.grall@linaro.org, JBeulich@suse.com, xen-devel@lists.xenproject.org, pranavkumar@linaro.org List-Id: xen-devel@lists.xenproject.org On 07/23/2014 02:04 PM, Stefano Stabellini wrote: > On Wed, 23 Jul 2014, George Dunlap wrote: >> On 07/23/2014 01:05 PM, Stefano Stabellini wrote: >>> 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) >> What are you actually trying to do here? Why do you add a vcpu struct, when >> all the callers (including the one you add in 2/2) just pass current? > I was just trying to be coherent with the other vcpu_* functions in > sched.h. I see. Yeah, I think even apart from the rest of it, "yield" implies "myself"; you can't really yield someone else. :-) -George