From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: "Randy.Dunlap" <rddunlap@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: bitmaps/bitops
Date: 16 Mar 2003 21:42:57 +0000 [thread overview]
Message-ID: <1047850976.21605.12.camel@irongate.swansea.linux.org.uk> (raw)
In-Reply-To: <200303160131.h2G1V3B10636@devserv.devel.redhat.com>
On Sun, 2003-03-16 at 01:31, Pete Zaitcev wrote:
> > but the prototype for test_and_set_bit() depends on $(ARCH), and it's
> > not consistent, with the second arg (bitmap address) being one of:
> > volatile void *
> > void *
> > volatile unsigned long *
>
> It should be unsigned long pointer. I have no idea why
> volatile is still alive. Perhaps Linus can remember why he
> left it in on is386. Other arch maintainers midnlessly ape him
> in this area. I think I even kept his e-mail where he explains
> why volatile has to go.
Several 2.4 drivers assume the test_and_set point is a memory
barrier for locking. Lots of
if(test_and_set_bit(0, &foo))
{
x=foodev->blah
Since its inline code and not a memory barrier otherwise there
is little stop the compile doing
x=foodev->blah
first
next prev parent reply other threads:[~2003-03-16 20:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1047762781.3457.linux-kernel2news@redhat.com>
2003-03-16 1:31 ` bitmaps/bitops Pete Zaitcev
2003-03-16 1:41 ` bitmaps/bitops Paul Mackerras
2003-03-16 21:42 ` Alan Cox [this message]
2003-03-15 21:09 bitmaps/bitops Randy.Dunlap
2003-03-15 21:51 ` bitmaps/bitops Geert Uytterhoeven
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=1047850976.21605.12.camel@irongate.swansea.linux.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=rddunlap@osdl.org \
--cc=zaitcev@redhat.com \
/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®