From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andrew Morton <akpm@osdl.org>,
Kernel development list <linux-kernel@vger.kernel.org>,
Zdenek Kabelac <zdenek.kabelac@gmail.com>,
pm list <linux-pm@lists.linux-foundation.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
davem@davemloft.net, Pierre Ossman <drzeus-mmc@drzeus.cx>
Subject: Re: [patch] Re: using long instead of atomic_t when only set/read is required
Date: Tue, 4 Mar 2008 04:16:33 +1100 [thread overview]
Message-ID: <200803040416.33937.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <20080303155330.39e45ad4@core>
On Tuesday 04 March 2008 02:53, Alan Cox wrote:
> > Atomicity of reads of write for pointers and integral types (other than
> > long long) should be documented.
>
> NAK.
>
> Atomicity of reads or writes for pointers and integral types is NOT
> guaranteed. Gcc doesn't believe in your guarantee.
Are you sure gcc doesn't? Or is it just "C"?
Linux wouldn't work today if gcc did something non-atomic there
(presuming you're talking about naturally aligned pointers/ints).
It is widely used and accepted.
RCU users are far from the only places to rely on this, although
I guess they are the main ones when it comes to assigning pointers
atomically.
next prev parent reply other threads:[~2008-03-03 17:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080225090316.GA420@elf.ucw.cz>
2008-02-25 14:46 ` using long instead of atomic_t when only set/read is required (was Re: [Bug 10030] Suspend doesn't work when SD card is inserted) Alan Stern
[not found] ` <Pine.LNX.4.44L0.0802250943410.3549-100000@iolanthe.rowland.org>
2008-03-03 12:08 ` [patch] Re: using long instead of atomic_t when only set/read is required Pavel Machek
[not found] ` <20080303120842.GA28369@elf.ucw.cz>
2008-03-03 15:42 ` Alan Stern
2008-03-03 15:48 ` Alan Cox
[not found] ` <Pine.LNX.4.44L0.0803031023550.3611-100000@iolanthe.rowland.org>
2008-03-03 15:53 ` Alan Cox
[not found] ` <20080303155330.39e45ad4@core>
2008-03-03 17:11 ` Alan Stern
2008-03-03 17:16 ` Nick Piggin [this message]
2008-03-03 17:31 ` Paul E. McKenney
2008-03-03 17:33 ` Alan Cox
2008-03-03 17:22 ` Paul E. McKenney
[not found] ` <20080303154831.22a4eb14@core>
2008-03-03 17:24 ` Pavel Machek
2008-03-03 20:27 ` Rafael J. Wysocki
[not found] ` <200803032127.30761.rjw@sisk.pl>
2008-03-03 21:12 ` Paul E. McKenney
2008-03-03 22:23 ` Linus Torvalds
[not found] <Pine.LNX.4.44L0.0803031207120.3611-100000@iolanthe.rowland.org>
2008-03-03 17:26 ` Linus Torvalds
2008-03-03 17:44 ` Pavel Machek
2008-03-06 15:58 ` Mark Lord
[not found] ` <47D014A6.9090300@rtr.ca>
2008-03-06 16:11 ` Linus Torvalds
[not found] ` <alpine.LFD.1.00.0803060807120.12253@woody.linux-foundation.org>
2008-03-06 16:27 ` Mark Lord
[not found] <20080303174422.GB13869@elf.ucw.cz>
2008-03-03 19:27 ` Alan Stern
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=200803040416.33937.nickpiggin@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@davemloft.net \
--cc=drzeus-mmc@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=zdenek.kabelac@gmail.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