On 17/03/17 18:19, Dario Faggioli wrote:
> Clarify and enforce (with ASSERTs) when the function
> is called on the idle domain, and explain in comments
> what it means and when it is ok to do so.
> 
> While there, change the name of the function to a more
> self-explanatory one, and do the same to VCPU2OP.
> 
> Signed-off-by: Dario Faggioli <dario.faggi...@citrix.com>
> ---
> Cc: George Dunlap <george.dun...@citrix.com>
> Cc: Juergen Gross <jgr...@suse.com>
> Cc: Jan Beulich <jbeul...@suse.com>
> ---
> Changes from v1:
>  - new patch;
>  - renamed VCPU2OP, as suggested during v1's review of patch 1.
> ---
>  xen/common/schedule.c |   56 
> ++++++++++++++++++++++++++++++++-----------------
>  1 file changed, 37 insertions(+), 19 deletions(-)
> 
> diff --git a/xen/common/schedule.c b/xen/common/schedule.c
> index d344b7c..fdb8ff4 100644
> --- a/xen/common/schedule.c
> +++ b/xen/common/schedule.c
> @@ -77,8 +77,25 @@ static struct scheduler __read_mostly ops;
>           (( (opsptr)->fn != NULL ) ? (opsptr)->fn(opsptr, ##__VA_ARGS__ )  \
>            : (typeof((opsptr)->fn(opsptr, ##__VA_ARGS__)))0 )
>  
> -#define DOM2OP(_d)    (((_d)->cpupool == NULL) ? &ops : 
> ((_d)->cpupool->sched))
> -static inline struct scheduler *VCPU2OP(const struct vcpu *v)
> +static inline struct scheduler *dom_get_scheduler(const struct domain *d)

Hmm -- I agree that VCPU2OP is probably not the right name, but I'm not
a fan of the new name either; and I don't have an option I like better yet.

With your permission I'll check in the first patch and come back to this.

 -George


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to