linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Warren <ivan@vmfacility.fr>
To: Olaf Hering <olh@suse.de>
Cc: Greg Smith <gsmith@nc.rr.com>,
	linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [OT] ppc64 serialization problem
Date: Wed, 29 Mar 2006 20:42:57 +0200	[thread overview]
Message-ID: <442AD531.2040702@vmfacility.fr> (raw)
In-Reply-To: <20060329183259.GA18514@suse.de>

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

Olaf Hering wrote:
>  On Wed, Mar 29, Greg Smith wrote:
>
>   
>> So it is clear between .A and .B -> value of b was read then written. If
>> anything happens between .A and .B to ->b, then it is lost.
>>     
>
> Even gcc4.1 does it that way with -O0
Yeah.. Noticed that..gcc 3.3.3 and gcc 4.0.3 also do this

Even declaring the field volatile has no effect..

Question :
Is this *NORMAL* behavior ? I discussed this with some C folks and they 
seem to think (at least some of them) that it's broken per standards.. 
(volatile fields should be only read/written IFF read/written explicitly 
- pretty much what section 6.3.7 of the C std says).

Anyway I can produce perfectly valid sample code (to my understanding 
anyway) that produces incorrect result.. YUCK !

This is also possibly a problem with the powerpc64 back end of gcc..

Anyway.. It's OT.. Sorry to have bothered you guys ! (And thanks Greg 
for pointing me here).

--Ivan

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3216 bytes --]

  reply	other threads:[~2006-03-29 18:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-29  1:58 [OT] ppc64 serialization problem Greg Smith
2006-03-29  3:11 ` Benjamin Herrenschmidt
2006-03-29  4:08   ` Greg Smith
2006-03-29  4:21     ` Benjamin Herrenschmidt
2006-03-29  4:07 ` Paul Mackerras
2006-03-29 18:20   ` Greg Smith
2006-03-29 18:32     ` Olaf Hering
2006-03-29 18:42       ` Ivan Warren [this message]
2006-03-29 21:29         ` Ivan Warren

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=442AD531.2040702@vmfacility.fr \
    --to=ivan@vmfacility.fr \
    --cc=gsmith@nc.rr.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=olh@suse.de \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).