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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a0224dc3d1e52f3d X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Streams and Concurrency Date: 1999/01/08 Message-ID: #1/1 X-Deja-AN: 430272168 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <36962E36.BA1A61B0@elca-matrix.ch> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1999-01-08T00:00:00+00:00 List-Id: Mats Weber (Mats.Weber@elca-matrix.ch) wrote: .. [discussion of restriction against potentially-blocking operations in protected operations] : ... : 4) It is another case where the standard enforces things that no : compiler can check, neither at compile time nor at run time. Ada 83 had : incorrect order dependences in this category, where it was allowed to : raise Program_Error if it found one. Fortunately, this was removed from : Ada 95 and I think the restriction on blocking protected operations : falls in the same category. Checking for explicit use of entry calls or task activation "statically" within the protected operation is not difficult. Checking for such uses outside the protected body is of course more difficult (though not impossible if willing to do it at link-time). Detecting incorrect order dependences, by contrast, involves solving the halting problem ;-). The restriction against performing other *entry* calls (or activating new tasks) while in a protected operation seems entirely appropriate, and I presume that GNAT does not support that. I agree that things which the programmer "knows" won't suspend the Ada task ("suspend" in the sense of waiting indefinitely for some other Ada task of potentially lower priority to wake it up) are safe and generally portable to do, so in this sense the standard was probably overly conservative. -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA