From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: is there a version of unix written in Ada Date: Thu, 1 Oct 2020 13:48:26 +0200 Organization: Adalog Message-ID: References: <00cd3aaa-d518-43a2-b321-58d6fae70aebo@googlegroups.com> <57eb7a65-51ea-4624-b9dc-9c4dda0fee59n@googlegroups.com> <5f70fd3b$0$13541$426a74cc@news.free.fr> <87wo0d3iac.fsf@nightsong.com> <87sgb02l7b.fsf@nightsong.com> <875z7vyy1u.fsf@nightsong.com> <87wo0bkns3.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 1 Oct 2020 11:48:23 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="2b758edadbc0032cb464fcdb63eae929"; logging-data="3421"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18EaPxl1Z5quP1ss+w7tD3B" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 Cancel-Lock: sha1:IHeEBrssDT3L0uivkgi1/w4YeFA= In-Reply-To: Content-Language: fr Xref: reader02.eternal-september.org comp.lang.ada:60358 List-Id: Le 01/10/2020 à 12:21, Dmitry A. Kazakov a écrit : >> It features, among others, a trace routine which is guaranteed to not be >> potentially blocking. > > It calls a protected operation on a different protected object, yes, > this is non-blocking, and I considered same, but is this legal? Maybe I > am wrong, but I have an impression that walking away to another object > is not OK. Or is that limited to protected entries only? A protected operation is not allowed to call a "potentially blocking operation", whose list is given in 9.5(30..33). And a protected subprogram is not on that list (except for the case of an external call on the same object, not the case here). > > Another issue is having two different calls: Trace and protected Trace. > If one used instead of another, you have a ticking bomb in the > production code. I remember that there was a GNAT pragma to catch it, > but it was a run-time check, so it just replaced one type of explosive > with another. Well, just use AdaControl with the rule: check Potentially_Blocking_Operations; ;-) -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr