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: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Oberon and Wirthian languages Date: Mon, 21 Apr 2014 11:16:56 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <1ljwj8f.1wqbhvuabsdw1N%csampson@inetworld.net> <51c7d6d4-e3be-44d5-a4ce-f7e875345588@googlegroups.com> <%J32v.70539$kp1.45343@fx14.iad> <8761m535e4.fsf_-_@ludovic-brenta.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 21 Apr 2014 18:16:58 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="7860b8cfd05853faa826624a41f2b899"; logging-data="30786"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18VvE/OP/z3jZp3/0IeByHOWg7MeR3QDAE=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: Cancel-Lock: sha1:TOz64XL3BZ0SYbopcOLXkWIImaw= X-Original-Bytes: 2425 Xref: number.nntp.dca.giganews.com comp.lang.ada:185913 Date: 2014-04-21T11:16:56-07:00 List-Id: On 04/21/2014 06:06 AM, Simon Clubley wrote: > > What I have not checked however is if a record assignment in Ada to a bit > field record variable marked as Atomic would result in all the bit fields > listed in the assignment being _guaranteed_ to be updated at the same time > or whether there would just be a atomic update of each component in > isolation. If you have a record: type Register_Info is record A : Boolean; ... end record; for Register_Info use record A at 0 range 0 .. 0; ... end record; and an atomic object of the type: Register : Register_Info; pragma Atomic (Register); If the compiler accepts the pragma, then assignment to Register (as opposed to its components) is atomic: Register := (A => True, ...); Though the best bet is to do it and check the generated code. -- Jeff Carter "I like it when the support group complains that they have insufficient data on mean time to repair bugs in Ada software." Robert I. Eachus 91