Re: [PATCH] fix and optimize clock source update

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

 



On Wed, 21 Jun 2006 23:38:32 +0200 (CEST)
Roman Zippel <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux