From: Andrew Morton <akpm@osdl.org>
To: Ingo Oeser <ioe-lkml@rameria.de>
Cc: zwane@arm.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][2.6] constant_test_bit doesn't like my gcc
Date: Thu, 16 Oct 2003 07:55:31 -0700 [thread overview]
Message-ID: <20031016075531.484c0441.akpm@osdl.org> (raw)
In-Reply-To: <200310161255.36380.ioe-lkml@rameria.de>
Ingo Oeser <ioe-lkml@rameria.de> wrote:
>
> On Thursday 16 October 2003 06:22, Zwane Mwaikambo wrote:
> > On Wed, 15 Oct 2003, Andrew Morton wrote:
> > > > static __inline__ int constant_test_bit(int nr, const volatile
> > > > unsigned long * addr) {
> > > > - return ((1UL << (nr & 31)) & (((const volatile unsigned int *)
> > > > addr)[nr >> 5])) != 0; + return ((1UL << (nr & 31)) & (addr[nr >> 5]))
> > > > != 0;
> > > > }
> > >
> > > Looks fine. Does your compiler get this right?
> >
> > Yep, thanks.
>
> Sorry, but I still don't get, what a "const volatile" is supposed to mean.
const: this function doesn't alter it
volatile: someone else does modify it, so the compiler needs to avoid
caching it in a register.
next prev parent reply other threads:[~2003-10-16 14:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-16 3:13 Zwane Mwaikambo
2003-10-16 4:10 ` Andrew Morton
2003-10-16 4:12 ` Zwane Mwaikambo
2003-10-16 4:21 ` Andrew Morton
2003-10-16 4:22 ` Zwane Mwaikambo
2003-10-16 10:55 ` Ingo Oeser
2003-10-16 14:55 ` Andrew Morton [this message]
2003-10-16 21:58 ` bill davidsen
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=20031016075531.484c0441.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ioe-lkml@rameria.de \
--cc=linux-kernel@vger.kernel.org \
--cc=zwane@arm.linux.org.uk \
/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®