comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: Complexity of protected objects
Date: 2 Mar 2002 17:06:34 -0800
Date: 2002-03-03T01:06:35+00:00	[thread overview]
Message-ID: <5ee5b646.0203021706.75f53f62@posting.google.com> (raw)
In-Reply-To: 3C7FBD74.D434411E@boeing.com

Jeffrey Carter <jeffrey.carter@boeing.com> 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).



  reply	other threads:[~2002-03-03  1:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-25 16:28 Complexity of protected objects tony gair
2002-02-25 16:45 ` Marin David Condic
2002-03-03  1:11   ` Robert Dewar
2002-03-03  4:13     ` Dale Stanbrough
2002-03-03 19:50       ` Robert Dewar
2002-02-25 17:35 ` Jim Rogers
2002-02-28 22:09   ` Nick Roberts
2002-02-28 23:32     ` Dale Stanbrough
2002-03-01  5:45       ` Jim Rogers
2002-03-03  0:59       ` Robert Dewar
2002-03-01 17:42     ` Jeffrey Carter
2002-03-03  1:06       ` Robert Dewar [this message]
2002-03-03  6:53         ` Jeffrey Carter
2002-03-03 19:36           ` Robert Dewar
2002-03-04 20:04             ` Jeffrey Carter
2002-03-03  0:54     ` Robert Dewar
2002-03-03  0:32   ` Robert Dewar
2002-02-25 22:01 ` Ted Dennison
2002-03-03  1:08   ` Robert Dewar
2002-03-04  9:33     ` Dmitry A. Kazakov
2002-03-04 16:44       ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox