From: "Stuart" <stuart@0.0>
Subject: Re: entries and access parameters
Date: Thu, 13 Jul 2006 18:45:16 +0100
Date: 2006-07-13T18:45:16+01:00 [thread overview]
Message-ID: <44b683f3$1_1@glkas0286.greenlnk.net> (raw)
In-Reply-To: 4hn8k3FdjobU1@individual.net
"Alex R. Mosteo" <devnull@mailinator.com> wrote in message
news:4hn8k3FdjobU1@individual.net...
> I'm trying to find in the 95 rationale the explanation for this point
>
> http://www.adahome.com/rm95/rm9x-09-05-02.html
>
> (13) An entry_declaration in a task declaration shall not contain a
> specification for an access parameter (See 3.10)
> I'm curious about that prohibition, mainly to know if workarounding it
> with
> a type like
I can't help with the reference to 3.10, but the annotated ARM gives the
following after 9.5.2 (13)
<quote>
Reason: Access parameters for task entries would require a complex
implementation. For example:
task T is
entry E(Z : access Integer); -- Illegal!
end T;
task body T is
begin
declare
type A is access all Integer;
X : A;
Int : aliased Integer;
task Inner;
task body Inner is
begin
T.E(Int'Access);
end Inner;
begin
accept E(Z : access Integer) do
X := A(Z); -- Accessibility_Check
end E;
end;
end T;
Implementing the Accessibility_Check inside the accept_statement for E is
difficult, since one does not know whether the entry caller is calling from
inside the immediately enclosing declare block or from outside it. This
means that the lexical nesting level associated with the designated object
is not sufficient to determine whether the Accessibility_Check should pass
or fail.
Note that such problems do not arise with protected entries, because
entry_bodies are always nested immediately within the protected_body; they
cannot be further nested as can accept_statements, nor can they be called
from within the protected_body (since no entry calls are permitted inside a
protected_body).
</quote>
--
Stuart
next prev parent reply other threads:[~2006-07-13 17:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-13 15:55 entries and access parameters Alex R. Mosteo
2006-07-13 17:45 ` Stuart [this message]
2006-07-13 17:53 ` Alex R. Mosteo
2006-07-13 20:19 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox