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!goblin2!goblin.stu.neva.ru!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Oberon and Wirthian languages Date: Tue, 22 Apr 2014 18:30:38 -0500 Organization: Jacob Sparre Andersen Research & Innovation 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> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1398209439 7497 69.95.181.76 (22 Apr 2014 23:30:39 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 22 Apr 2014 23:30:39 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Original-Bytes: 2692 Xref: number.nntp.dca.giganews.com comp.lang.ada:185949 Date: 2014-04-22T18:30:38-05:00 List-Id: "Simon Clubley" wrote in message news:lj4de1$jql$1@dont-email.me... ... >> If the compiler accepts the pragma, then assignment to Register (as >> opposed to >> its components) is atomic: >> >> Register := (A => True, ...); > > Thank you. It was not at all 100% clear from the RM if Ada offered the > _guarantee_ that if you had, say, 3 components in a record assignment > for a atomic bitfield record, that the record assignment would be treated > as one atomic operation instead of 3 atomic operations (one for each > component). It's not quite a guarentee, as it's Implementation Advice (C.6(22-23/2). The reason for it being IA is simply that we can't use undefined terms like "load" and "store" in normative wording. In this case, IA is actually stronger because we can say directly what we mean without defining it exactly. In theory, implementations are supposed to document all cases where they do not follow Implementation Advice, so you should be able to determine for a particular implementation as to whether it is followed. I don't think there could be an absolute guarantee, as the idea of a load or store might not make sense on a data-flow machine (or some other exotic design). I would guess that implementers do this in virtually all cases. As Jeff said, if it is really critical, you have a verify the code. Randy.