[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v6a 12/17] xen/arm: move and rename is_vcpu_running function to sched.h



>>> On 26.06.14 at 07:34, <vijay.kilari@xxxxxxxxx> wrote:
> --- a/xen/include/xen/sched.h
> +++ b/xen/include/xen/sched.h
> @@ -829,6 +829,22 @@ void watchdog_domain_destroy(struct domain *d);
>  #define need_iommu(d)    (0)
>  #endif
>  
> +static inline bool_t is_vcpu_online(const struct domain *d, int vcpuid)

unsigned int please.

> +{
> +    const struct vcpu *v;
> +
> +    if ( vcpuid >= d->max_vcpus || d->vcpu == NULL )
> +        return 0;
> +
> +    v = d->vcpu[vcpuid];
> +    if ( v == NULL )
> +        return 0;
> +    if ( test_bit(_VPF_down, &v->pause_flags) )
> +        return 0;
> +
> +    return 1;

I'd prefer the simpler "return !test_bit()".

Jan


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.