comp.lang.ada
 help / color / mirror / Atom feed
From: Jere <jhb.chat@gmail.com>
Subject: Re: Ravenscar References
Date: Fri, 1 Feb 2019 18:13:39 -0800 (PST)
Date: 2019-02-01T18:13:39-08:00	[thread overview]
Message-ID: <be341f65-6b6b-484e-8b47-58c8bb18fd59@googlegroups.com> (raw)
In-Reply-To: <gbbnj1F65bbU1@mid.individual.net>

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ó:
> >> Le 16/01/2019 à 18:48, lyttlec a écrit :
> >>> Can anyone suggest a good reference on using the ravenscar profile? In
> >>> 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.
> 
> But, disappointingly, it still contains the (IMO) misleading advice that 
> "All global objects that are either of a protected type or an atomic 
> type may be safely shared".
> 
> IMO atomic-type objects can be safely shared only if care is taken to 
> follow a proper lock-free read/write protocol.
> 

I got the impression from the entire section there that the author was 
referring to erroneous access from data races, which would make the
statement "technically" correct.  The X := X + 1 case is not 
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, 
but they definite make you safe from data races.

That doesn't detract from the meat of your general point that 
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 
intending to go into race conditions and instead focused on 
data races (erroneous access), at least for that section of the
paper.

      parent reply	other threads:[~2019-02-02  2:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16 17:48 Ravenscar References lyttlec
2019-01-16 18:15 ` Simon Wright
2019-01-18 19:18   ` lyttlec
2019-01-20 17:12     ` Jeffrey R. Carter
2019-01-21 23:19       ` Randy Brukardt
2019-01-22  9:25         ` J-P. Rosen
2019-01-22 22:05           ` Randy Brukardt
2019-01-28  0:38             ` lyttlec
2019-01-17  5:31 ` J-P. Rosen
2019-01-17  8:46   ` Niklas Holsti
2019-01-29  1:08   ` Jorge Real
2019-01-29 19:24     ` Niklas Holsti
2019-02-01 10:06       ` Jorge Real
2019-02-02  2:13       ` Jere [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox