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,fb45e48e8dddeabd X-Google-Attributes: gid103376,public X-Google-Thread: ffc1e,fb45e48e8dddeabd X-Google-Attributes: gidffc1e,public From: Robert A Duff Subject: Re: Ada Protected Object Tutorial #1 Date: 1999/12/20 Message-ID: #1/1 X-Deja-AN: 563016916 Sender: bobduff@world.std.com (Robert A Duff) References: <839toq$pu$1@bgtnsc03.worldnet.att.net> <3858E5B3.9AB004E9@bton.ac.uk> <385984BC.1FB1@hello.nl> <86aen9z7qi.fsf@ppp-111-13.villette.club-internet.fr> <86u2lgvumy.fsf@ppp-116-44.villette.club-internet.fr> <33qr5scnbs04v391ev4541p5bv48hklg3q@4ax.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.programming.threads,comp.lang.ada Date: 1999-12-20T00:00:00+00:00 List-Id: Brian Orpin writes: > On 18 Dec 1999 21:52:53 +0100, Laurent Guerby wrote: > >No, the Ada compiler can statically make the difference between an > ^^^^^^^^^^ > >internal and external call. There is no locking involved at all for > >internal calls. That is the fundamental point of protected procedures, > >they are lightweight and efficient, but you are of course restricted > >on what you do inside them. If you need to do more things, you use an > >entry, and then there are locks and all the stuff you mention. > > I would hope that this could be forced on the compiler as in a > multiprocessor system with some form of Dual-Port-RAM (or a VME bus) the > compiler would not have a hope in hell of determining statically whether > to lock or not. > > It also needs a definition of internal and external. Data may be passed > 'internally' but if it is also available externally then it must be > treated as an external call. Yes, "internal" and "external" calls are defined in the Ada Reference Manual. This definition allows the compiler to distinguish the two at compile time. It has nothing to do with dual-port RAM and so forth. - Bob