[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] credit: track residual from divisions done during accounting
At 12:54 +0000 on 26 Feb (1361883253), George Dunlap wrote: > On 02/26/2013 12:21 PM, Ian Campbell wrote: > >On Tue, 2013-02-26 at 12:00 +0000, David Vrabel wrote: > >>On 26/02/13 11:52, Tim Deegan wrote: > >>>How about ASSERT(((typeof credits) val) == val) before the assignment? > > > >Why not just > > ASSERT(credits == val); /* Ensure we haven't truncated val */ > > I prefer this one to having "typeof credits" in the ASSERT. The main > thing is just to minimize the amount of effort a programmer has to > expend trying to figure out what's going on, so he can spend it on > something else. :-) Quite. It occurred to me afterwards that we could have a FITS_IN() macro for that purpose. Or, as mentioned, a comment. :) Tim. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |