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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!2.eu.feeder.erje.net!feeder.erje.net!2.us.feeder.erje.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 06 May 2017 14:10:59 -0500 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: Portable memory barrier? Date: Sat, 06 May 2017 15:08:39 -0400 Organization: IISS Elusive Unicorn Message-ID: References: <36434cd8-bc44-4d4a-957d-987fdf106be7@googlegroups.com> User-Agent: ForteAgent/8.00.32.1272 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 108.68.179.43 X-Trace: sv3-TFtVRG7prVm0RJgm0Q0mbSEfSruLy3t55/i3Q7o9+B3OTfl7PBkHTM3j1MJXk2Y1St9hDGUvWUl+FSL!vryu06Nh2yYUh/kGJrt9xdBxiJNbQaiqT9unTD2e9uLxSdE2Pym/BvioJJeMvftgt550IZwMDPgn!r1Rvj/jRL7+VDRrIQOLH+Avy3Rs= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2052 Xref: news.eternal-september.org comp.lang.ada:46687 Date: 2017-05-06T15:08:39-04:00 List-Id: On Sat, 6 May 2017 07:17:10 -0700 (PDT), Jere declaimed the following: >Is this not the case? My understanding of "volatile" is that it means: do not cache/optimize (say, by assigning it to a register within the scope of the procedure); instead, every source (read) usage must read the physical address, on the basis that some other process (or hardware) may have changed the contents behind your back. While a processor may reorder operations for efficiency, no optimization (run-time or compiler) should reorder an update if the subsequent operation needs to read the updated value. ipt := ipt + 1; arr(ipt) := something; rndvar := othervar; could reorder the last line to anywhere in the sequence. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/