From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e0e1d3b3f7c994b8 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!peer1.news.newnet.co.uk!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Robert Dewar's great article about the Strengths of Ada over other langauges in multiprocessing! Date: Fri, 14 Mar 2008 21:54:26 +0000 Organization: Pushface Message-ID: References: <13t4b2kkjem20f3@corp.supernews.com> <114f711c-9cf8-4fdb-8f11-77667afb8719@c33g2000hsd.googlegroups.com> <33557da4-e4ba-4c75-9a55-4b7eb5fdad3b@i12g2000prf.googlegroups.com> <44104211-afd5-4cf7-8467-90471d4afd1b@f63g2000hsf.googlegroups.com> <2c2989ba-a109-40d6-b0a3-f91d94a2d291@a1g2000hsb.googlegroups.com> <9e12a297-599c-48e5-a5f9-5d6dee70e8dc@59g2000hsb.googlegroups.com> <4bf50326-6ebf-455d-b54f-e1e75f265f50@d62g2000hsf.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1205531667 14859 62.49.19.209 (14 Mar 2008 21:54:27 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Fri, 14 Mar 2008 21:54:27 +0000 (UTC) Cancel-Lock: sha1:Ykf5LT2Ou3rAqARgMaCY+S1GE3I= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin) Xref: g2news1.google.com comp.lang.ada:20402 Date: 2008-03-14T21:54:26+00:00 List-Id: gpriv@axonx.com writes: > On Mar 13, 6:25 pm, Maciej Sobczak wrote: >> On 13 Mar, 17:16, gp...@axonx.com wrote: >> >> > So if you write to IO through volatile and later read from it, you may >> > get the same value fetched back by "smart" CPU. >> >> I would expect that I/O is realized within the range of memory >> addresses that is excluded from the "smart" handling (your BIOS setup > > I would expect that too, but not sure that "compatitive" compiler > vendors will share my/your beliefs. I think that 'volatile' is only a way to tell the compiler that this object must be read/written directly each time; don't copy it to a register and manipulate values there. Likewise 'atomic' says to read/write the whole thing with one machine operation. Probably because that's what the IO hardware requires; eg, you must write all 32 bits at once, not just the only byte you've changed.. The only time this makes sense is with memory-mapped IO where the system must be designed so that this is sensible. If you try it with memory with varying levels of hardware cache and with multiple cores you are going to be disappointed, I think.