Messages in this thread | | | Date | Wed, 21 Jun 2006 14:51:04 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] fix and optimize clock source update |
| |
On Wed, 21 Jun 2006 23:38:32 +0200 (CEST) Roman Zippel <zippel@linux-m68k.org> wrote:
> > > +#define clocksource_adjustcheck(sign, error, interval, offset) ({ \ > > > + int adj = sign; \ > > > + error >>= 2; \ > > > + if (unlikely(sign > 0 ? error > interval : error < interval)) { \ > > > + adj = clocksource_bigadjust(sign, error, \ > > > + interval, offset); \ > > > + interval <<= adj; \ > > > + offset <<= adj; \ > > > + adj = sign << adj; \ > > > + } \ > > > + adj; \ > > > +}) > > > > That's still a #define with side effects. Yuck. > > The alternative is duplicating the code and an inline function which takes > the address of these variables would likely generate worse code.
Can you verify that please? It is pretty sick. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |