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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Read-write mutex sometimes fails on deadlock Date: Wed, 15 Nov 2017 16:57:32 -0600 Organization: JSA Research & Innovation Message-ID: References: <4502cd60-b843-4ace-99da-d716fc455635@googlegroups.com> <14ca8f28-a689-4431-9122-81a1c504569c@googlegroups.com> <1810768e-7846-43ca-9871-b2468a060c37@googlegroups.com> Injection-Date: Wed, 15 Nov 2017 22:57:33 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="17676"; mail-complaints-to="news@jacob-sparre.dk" 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.7246 Xref: feeder.eternal-september.org comp.lang.ada:48921 Date: 2017-11-15T16:57:32-06:00 List-Id: "J-P. Rosen" wrote in message news:ou8lod$3iq$3@dont-email.me... > Le 12/11/2017 à 05:33, Robert Eachus a écrit : >> On Monday, November 6, 2017 at 1:31:07 PM UTC-5, Simon Wright wrote: >>> Robert Eachus writes: >>> >>>> entry Write (D: in Data) is >>>> begin >>>> The_Data := D; >>>> Some_Data := True; >>>> Print(D); >>>> delay 0.1; >>>> end Write; >>> >> Having said that, the delay 0.1 is very naughty, but on most hardware it >> will be implemented as a counting loop. (Make it delay 0.0001 if that >> makes you happier. ;-) It is not illegal, and is only erroneous if it >> results in a scheduling action. >> > Delay is potentially blocking operation, so this is definitely a bounded > error. But it is allowed for a bounded error situation to give the > proper result... Unless pragma Detect_Blocking is given (which should have been the default in Ada, IMHO -- predictable is always better than "might work -- or not"). In that case, raising Program_Error is required. If the new aspect Nonblocking is used, the delay is statically illegal. (That *really* should have been the default, but it took us 20 years to figure out the right set of rules -- too late to mandate.) Randy.