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

Re: [Xen-devel] [PATCH v7a 09/14] xen/arm: move and rename is_vcpu_running function to sched.h



On Tue, 2014-07-01 at 08:55 +0100, Jan Beulich wrote:
> >>> On 01.07.14 at 08:41, <vijay.kilari@xxxxxxxxx> wrote:
> > @@ -829,6 +829,20 @@ void watchdog_domain_destroy(struct domain *d);
> >  #define need_iommu(d)    (0)
> >  #endif
> >  
> > +static inline bool_t is_vcpu_online(const struct domain *d, unsigned int 
> > vcpuid)
> 
> I'm sorry for paying attention to this only now, but a function named
> this way would ordinarily have a single const struct vcpu * parameter.
> If the decoding of the (domain, vcpuid) tuple is to remain in the
> function I guess it ought to be renamed to e.g. is_domain_vcpu_online()

Looking at the callers it doesn't seem unreasonable to me to push the
indexing of d->vcpus into them.

d is used for the d->max_vcpus check -- which the callers all have
already or are naturally avoiding and the check for d->vcpus == NULL,
which I suspect is out of the question for the existing callers (but
would need checking)

> (I'd further suggest to drop the is_ prefix, but I realize others may be
> of different opinion).
> 
> 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®.