From: Andrew Morton <akpm@osdl.org>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: johnstul@us.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix and optimize clock source update
Date: Wed, 21 Jun 2006 14:51:04 -0700 [thread overview]
Message-ID: <20060621145104.b13af6aa.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0606212320450.12900@scrub.home>
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.
next prev parent reply other threads:[~2006-06-21 21:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-21 12:38 Roman Zippel
2006-06-21 20:58 ` john stultz
2006-06-21 21:38 ` Roman Zippel
2006-06-21 21:51 ` Andrew Morton [this message]
2006-06-22 11:19 ` Roman Zippel
2006-06-22 14:51 ` john stultz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060621145104.b13af6aa.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zippel@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®