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

Re: [Xen-devel] [PATCH RFC v1 3/4] libxl for rt scheduler



On Fri, 2014-07-11 at 17:08 +0200, Dario Faggioli wrote:

> > +    if ( !scinfo->rt.vcpus ){
> > +        LOGE(ERROR, "Allocate lib_vcpu array fails\n");
> > +        return ERROR_INVAL;
> > +    }
> > +    scinfo->rt.num_vcpus = sdom.num_vcpus;
> > +    for( i = 0; i < sdom.num_vcpus; ++i)
> > +    {
> > +        scinfo->rt.vcpus[i].period = sdom.vcpus[i].period;
> > +        scinfo->rt.vcpus[i].budget = sdom.vcpus[i].budget;
> > +    }
> > +
> > +    return 0;
> > +}
> > +
> > +#define SCHED_RT_VCPU_PARAMS_MAX    4294967295 /* 2^32-1 */
> > +
> I don't like the name. I'd go for something like
> SCHED_RT_VCPU_PERIOD_MAX and SCHED_RT_VCPU_BUDGET_MAX.
> 
> You well can define both to the same value, of course.

If you want the largest unsigned which can be represented in 32-bits
then please use UINT32_MAX from stdint.h

Ian.


_______________________________________________
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®.