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: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Ravenscar References Date: Thu, 17 Jan 2019 10:46:17 +0200 Organization: Tidorum Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net TIOlP+9L0IhsBTjo3s6dFwMzygMG84uuC8VV/uN+SpV1BXl2vG Cancel-Lock: sha1:HDOu9fzi1CEcDdlt1OJbMzYpqbo= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: reader01.eternal-september.org comp.lang.ada:55292 Date: 2019-01-17T10:46:17+02:00 List-Id: On 19-01-17 07:31 , J-P. Rosen wrote: > 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 that the discussion of pragma Atomic in that document invites risky programming. For example, it says "All global objects that are either of a protected type or an atomic type may be safely shared, and so no static identification [to find risky, unprotected sharing] is required for these." However, as I trust most of us know, while a pragma Atomic ensures that any read or write of the object is itself atomic, it does not ensure that a read-modify-write update sequence, such as X := X + 1, is atomic in its entirety. IMO this means that even atomic shared objects should be identified and the safety of their uses checked. And that using a protected type, with its fully atomic operations, is preferable, when possible. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .