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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!nospam From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: Barrier re-evaluation issue with GNAT 4.3.2 Date: Tue, 29 Sep 2009 11:06:47 -0400 Organization: The Wasteland Message-ID: References: NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.0 Cancel-Lock: sha1:5c+riyp/lebYiI1N34zHTyFt9vA= User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Xref: g2news2.google.com comp.lang.ada:8532 Date: 2009-09-29T11:06:47-04:00 List-Id: In article , Reto Buerki wrote: > Jeffrey R. Carter wrote: > > Reto Buerki wrote: > >> > >> Update: we just noticed that the warning actually *does* show up but we > >> missed it in the previous build. > >> > >> I also think the warning is irrelevant. It seems that the compiler is > >> not smart enough to figure out that the Signal() entry is always open. > > > > An entry call is always potentially blocking, regardless of its barrier; > > see ARM 9.5.1. Technically, this code contains a bounded error. Since > > the potentially blocking operation was detected, your program should > > raise Program_Error; GNAT pretends that it hasn't detected that the > > operation is potentially blocking and lets you get away with only a > > warning. Other compilers (and even other versions of GNAT) may actually > > raise Program_Error. > > Thanks for the clarification and the pointer to the ARM. This basically > means that our workaround is not legal Ada code ... Well, it's a bounded error. Using Pragma Detect_Blocking, as suggested by Bob Duff, will tell you if the compiler's warning is actualized at run-time. As this is a work-around and your original code seems correct, you might arrange things so that the original can be restored easily upon upgrade or port. Because this can be a maintenance headache, you might also look through some other examples of Timing_Events with a view towards your intended usage: -- John B. Matthews trashgod at gmail dot com