Re: GNAT for MS Visual Studio
- From: Maciej Sobczak <see.my.homepage@xxxxxxxxx>
- Date: Mon, 08 Oct 2007 03:32:44 -0700
On 8 Pa , 09:50, "Dmitry A. Kazakov" <mail...@xxxxxxxxxxxxxxxxx>
wrote:
It is called "higher level language," which translates to "you cannot have
ideas even if you just do 'a read'". I.e. there is no difference.
There is - others already explained that containers do some
bookkeeping even when they are "just" read. This bookkeeping is hidden
from you.
What is a shared data outside the protected object?
If I have an access variable that is kept inside the protected object
- is the object (the target) considered to be inside the protected
object as well?
Certainly not.
Then certainly everything is FUBARed.
Consider a container inside the protected object. The container
presumably has access variables to actual contained objects (to
elements) - some containers just cannot be implemented any other way.
If the target objects are considered to be OUTside of the protected
object and thus unprotected, then I'm looking forward to see an
explanation how the synchronized manipulation of these contained
objects is supposed to work.
Maybe those patterns are just wrong? (:-)) If you use an access
discriminant or component in a protected object, then the target shall not
be accessible otherwise than through a protected action traversing this
object.
Yes. But is this guaranteed? AARM seems to say that objects outside of
the protected objects are not synchronized. Is the target object
covered or not?
Consider this:
protected P is
procedure Set (I : Integer);
function Get return Integer;
end P;
Value : Integer;
protected body P is
procedure Set (I : Integer) is
begin
Value := I;
end Set;
function Get return Integer is
begin
return Value;
end Get;
end P;
Assume that users only interact with the protected object (Value can
be in the package body, etc.).
Is it compliant? As far as I understand AARM (9.10/9.b), it is not.
Value is OUTside of the protected object.
If it's not, then just adding access value to Value will not make any
difference, unless access values have some implicit magic properties
in the area of memory consistency.
I don't see any problems with procedures and entries, functions are my
concern.
See above. Is it "kosher"? If yes, then 9.10/9.b is unclear to me. If
not, then there is no way to synchronize a container that is
implemented in terms of references (linked lists, etc.).
I am not sure what you mean here. You can safely access things outside
protected objects from protected actions.
Can you confront it with 9.10/9.b?
--
Maciej Sobczak * www.msobczak.com * www.inspirel.com
.
- Follow-Ups:
- Re: GNAT for MS Visual Studio
- From: Dmitry A. Kazakov
- Re: GNAT for MS Visual Studio
- From: Maciej Sobczak
- Re: GNAT for MS Visual Studio
- References:
- Re: GNAT for MS Visual Studio
- From: Randy Brukardt
- Re: GNAT for MS Visual Studio
- From: Maciej Sobczak
- Re: GNAT for MS Visual Studio
- From: Pascal Obry
- Re: GNAT for MS Visual Studio
- From: Maciej Sobczak
- Re: GNAT for MS Visual Studio
- From: Pascal Obry
- Re: GNAT for MS Visual Studio
- From: Matthew Heaney
- Re: GNAT for MS Visual Studio
- From: Pascal Obry
- Re: GNAT for MS Visual Studio
- From: Dmitry A. Kazakov
- Re: GNAT for MS Visual Studio
- From: Pascal Obry
- Re: GNAT for MS Visual Studio
- From: Dmitry A. Kazakov
- Re: GNAT for MS Visual Studio
- From: Maciej Sobczak
- Re: GNAT for MS Visual Studio
- From: Dmitry A. Kazakov
- Re: GNAT for MS Visual Studio
- From: Maciej Sobczak
- Re: GNAT for MS Visual Studio
- From: Dmitry A. Kazakov
- Re: GNAT for MS Visual Studio
- Prev by Date: Announce: Binary package for GtkAda-2.10.0 for Windows
- Next by Date: Re: GNAT for MS Visual Studio
- Previous by thread: Re: GNAT for MS Visual Studio
- Next by thread: Re: GNAT for MS Visual Studio
- Index(es):
Relevant Pages
|