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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,98e311935a219163 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-24 12:41:19 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!upp1.onvoy!onvoy.com!news-out.visi.com!hermes.visi.com!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!59ce1190!not-for-mail Message-ID: <3CEE9750.E12FCD12@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Help with Copying Shared Memory to Local References: <3CED51CF.39E26FC6@acm.org> <3CEDA095.61BE6EF6@acm.org> <478AE9B914ED6844.5DEC7C5E64D6473E.909AD32BDF37CFA7@lp.airnews.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 24 May 2002 19:41:17 GMT NNTP-Posting-Host: 63.184.110.81 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1022269277 63.184.110.81 (Fri, 24 May 2002 12:41:17 PDT) NNTP-Posting-Date: Fri, 24 May 2002 12:41:17 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:24677 Date: 2002-05-24T19:41:17+00:00 List-Id: "John R. Strohm" wrote: > > Jeffrey, I surmise that you have not spent a lot of time doing device > drivers in embedded systems. The original post discussed copying the contents of memory from one place to another. Some of the memory was described as "shared", but no mention was made of device drivers. If specific machine code instructions are required to access a device, nothing in Ada is guaranteed to give you those instructions except a machine code insertion. Representation clauses, Atomic, Volatile, and the like will frequently work, but you have no guarantee that what works for a given compiler and platform will work with any other compiler or platform, including other versions of the same compiler. The original post clearly indicated that all that was needed to access shared memory was a suitable address and 2-byte access. A 2-byte atomic type a corresponding array with atomic components will produce that on many systems. If it doesn't work for the poster's system, then a machine code insertion is in order. -- Jeff Carter "Go and boil your bottoms." Monty Python & the Holy Grail