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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:2782:: with SMTP id g124mr5989283ita.26.1549073619840; Fri, 01 Feb 2019 18:13:39 -0800 (PST) X-Received: by 2002:aca:cc0f:: with SMTP id c15mr304413oig.3.1549073619714; Fri, 01 Feb 2019 18:13:39 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!q69no357301itb.0!news-out.google.com!v71ni471ita.0!nntp.google.com!q69no357298itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 1 Feb 2019 18:13:39 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.109.61.2; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 70.109.61.2 References: <87f58059-72c9-4416-a24f-0251f6bceffd@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ravenscar References From: Jere Injection-Date: Sat, 02 Feb 2019 02:13:39 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:55429 Date: 2019-02-01T18:13:39-08:00 List-Id: On Tuesday, January 29, 2019 at 2:24:19 PM UTC-5, Niklas Holsti wrote: > On 19-01-29 03:08 , Jorge Real wrote: > > El jueves, 17 de enero de 2019, 6:31:34 (UTC+1), J-P. Rosen escribi=C3= =B3: > >> Le 16/01/2019 =C3=A0 18:48, lyttlec a =C3=A9crit : > >>> Can anyone suggest a good reference on using the ravenscar profile? I= n > >>> the Ada books I have, it only gets a one or two page mention. A > >>> reference with an extended case study would be great. > >>> > >> Did you get the official report at > >> http://www.open-std.org/jtc1/sc22/wg9/n424.pdf > >> ? > > > > Note there is a revised version of of the Ravenscar guide at > > http://www.open-std.org/JTC1/SC22/WG9/n575.pdf > > > > This version of June 2017 is adapted to Ada 2012 TC1. >=20 > But, disappointingly, it still contains the (IMO) misleading advice that= =20 > "All global objects that are either of a protected type or an atomic=20 > type may be safely shared". >=20 > IMO atomic-type objects can be safely shared only if care is taken to=20 > follow a proper lock-free read/write protocol. >=20 I got the impression from the entire section there that the author was=20 referring to erroneous access from data races, which would make the statement "technically" correct. The X :=3D X + 1 case is not=20 technically erroneous (not a data race). It's instead considered a race condition (which is not technically erroneous). Atomic variables don't do anything to protect you from race conditions,=20 but they definite make you safe from data races. That doesn't detract from the meat of your general point that=20 protected objects are much more capable of preventing unwanted code results than atomic variables and that atomic variables should be used with care. I just don't think the author was=20 intending to go into race conditions and instead focused on=20 data races (erroneous access), at least for that section of the paper.