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 10.99.44.197 with SMTP id s188mr5436177pgs.61.1494707135500; Sat, 13 May 2017 13:25:35 -0700 (PDT) X-Received: by 10.157.31.68 with SMTP id x4mr198976otx.19.1494707135454; Sat, 13 May 2017 13:25:35 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!c26no1285349itd.0!news-out.google.com!m134ni4343itb.0!nntp.google.com!c26no1285347itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 13 May 2017 13:25:35 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.71.201.205; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 173.71.201.205 References: <0fc56bf7-1cfa-4776-9c47-a573db315c5f@googlegroups.com> <7b0c08eb-be62-4d14-ae99-cad038ad0a62@googlegroups.com> <077e7f6a-5a7b-4b88-a16f-7672aec18a17@googlegroups.com> <3edf3e1a-e823-40f5-9227-04642101895b@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <23328693-a906-4f29-80cf-249ce1ec5b95@googlegroups.com> Subject: Re: Portable memory barrier? From: Jere Injection-Date: Sat, 13 May 2017 20:25:35 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:46772 Date: 2017-05-13T13:25:35-07:00 List-Id: On Thursday, May 11, 2017 at 3:36:09 AM UTC-4, Dmitry A. Kazakov wrote: > On 11/05/2017 00:56, Jere wrote: > > On Wednesday, May 10, 2017 at 1:26:00 AM UTC-4, J-P. Rosen wrote: > >> Le 10/05/2017 =C3=A0 02:51, Jere a =C3=A9crit : > >>> Is there a method besides Atomic? If I am implementing a generic FIF= O (lock > >>> free) and the FIFO elements are complex data types that may not be ab= le to be > >>> atomic, do I have any other options or are protected objects my only = way out? > >> > >> Protected objects, or for a lower level, Synchronous_Task_Control. I > >> know that you want lock free algorithms, but out of curiosity, did you > >> measure the cost of locking algorithms? IOW, is all of this worth the > >> trouble? >=20 > > I wasn't necessarily aiming for a specific speed/cost. I know I can ea= sily > > find a standard task safe container and use that and it might be faster= (or at > > least fast enough) on various platforms. This is more for a different = option > > from the normal. It might be faster on some platforms or slower, but i= t is > > mostly meant to be a tool in toolkit. > > >=20 > So, Jere, when you become ARG (:-)), please, push for requirement to=20 > support Atomic for all scalar objects. If the machine lacks=20 > corresponding instructions the compiler must fall back to a protected=20 > object. And conversely, if there is a strong case that using a protected= =20 > action might be more efficient than machine's atomic access=20 > instructions, the compiler should use the former. >=20 Well,I believe Randy was offering up to Shark8, but it is definitely the ty= pe of=20 thing I enjoy. I'm very much into semantics when it comes to this type of= =20 stuff, though obviously I am no where near good enough in the Ada standard.= Nor=20 am I experienced enough yet with enough big systems. My experience is main= ly in=20 bare metal applications, where Ada is not very predominant (though not abse= nt). =20 I am much more comfortable in areas where there are no OS'es and the CPU's = are=20 fairly simple microcontrollers (8 to 32bit single core).=20 I read through a lot of the posted ARG discussions/minutes, and I did find = them=20 pretty interesting. I found myself disagreeing with some people and agreei= ng=20 with others. That said, I am very inexperienced and backseat ARG'ing is ea= sy to=20 do when I am in my position. It's a difficult job I am sure!