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 X-Google-Thread: 103376,af960bc705aaf51b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-02 17:06:35 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Complexity of protected objects Date: 2 Mar 2002 17:06:34 -0800 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0203021706.75f53f62@posting.google.com> References: <3C7A75F2.30503@worldnet.att.net> <3c7e7c60.8192226@news.cis.dfn.de> <3C7FBD74.D434411E@boeing.com> NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1015117595 25744 127.0.0.1 (3 Mar 2002 01:06:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 3 Mar 2002 01:06:35 GMT Xref: archiver1.google.com comp.lang.ada:20706 Date: 2002-03-03T01:06:35+00:00 List-Id: Jeffrey Carter wrote in message news:<3C7FBD74.D434411E@boeing.com>... > Certain language-defined subprograms are potentially blocking. In > particular, the subprograms of the language-defined input-output > packages that manipulate files (implicitly or explicitly) are > potentially blocking. > > Thus, I/O as always potentially blocking because the > language defines it as such. Umm, I am afraid our syllogistic apparatus is malfunctioning here. The predicate said (I will shout to make sure no one else misses it) LANGUAGE-DEFINED input-output packages. It is entirely wrong to assume this says something about all I/O. The point is that if the implementation introduces non-language defined I/O, then it will have to decide whether it is PB or not (in GNAT such I/O is not defined to be PB). Even if you do language defined I/O that *is* PB, let's read the RM to see what happens if you do a PB action in a PT: 8 During a protected action, it is a bounded error to invoke an operation that is potentially blocking. The following are defined to be potentially blocking operations: 17 If the bounded error is detected, Program_Error is raised. If not detected, the bounded error might result in deadlock or a (nested) protected action on the same target object. Now of course this means that any program doing PB operations in a PT has an implementation dependent effect, so most certainly you need to check that it will work on the implementation you are using, and the code is non-portable (since it might not work on lock-free implementations for instance).