comp.lang.ada
 help / color / mirror / Atom feed
From: Mats Weber <Mats.Weber@elca-matrix.ch>
Subject: Re: Tasks and C/C++ code.
Date: 1998/11/23
Date: 1998-11-23T00:00:00+00:00	[thread overview]
Message-ID: <36599BE3.BA30555B@elca-matrix.ch> (raw)
In-Reply-To: 87k90qunxl.fsf@zaphod.enst.fr

Samuel Tardieu wrote:

> Mats> Why not ? If the C function is potentially blocking _and_
> Mats> non-reentrant (as is gethostbyname for example, which can take
> Mats> some time), then it's the only option.
> 
> 9.5.1 (8) During a protected action, it is a bounded error to invoke
>           an operation that is potentially blocking.
> 
> I think that the spirit of protected operations is to be really short.

OK, but the definition of "potentially blocking" does not include
imported subprograms (RM 9.5.1(8-18)). So I guess this is undefined. But
given the spirit of the definition, I agree that it would be better to
put the call in a task body instead of in a protected body, in order not
to be too close to the boundaries of the standard.

Anyway I have seen gethostbyname protected by a protected object (I
think it is in GLADE). So it does work.




  reply	other threads:[~1998-11-23  0:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-09  0:00 Tasks and C/C++ code Barry L. Dorough
1998-11-09  0:00 ` Mats Weber
1998-11-10  0:00 ` dennison
1998-11-11  0:00   ` dbotton
1998-11-11  0:00     ` Barry L. Dorough
1998-11-11  0:00       ` dennison
1998-11-12  0:00       ` Jerry van Dijk
1998-11-13  0:00       ` Mats Weber
1998-11-11  0:00     ` dennison
1998-11-18  0:00     ` Samuel Tardieu
1998-11-19  0:00       ` Mats Weber
1998-11-20  0:00         ` Samuel Tardieu
1998-11-23  0:00           ` Mats Weber [this message]
1998-11-23  0:00             ` Tom Moran
1998-11-24  0:00               ` Blocking protected ops (was: Tasks and C/C++ code) Mats Weber
1998-11-24  0:00                 ` Robert I. Eachus
1998-11-25  0:00                   ` Mats Weber
1998-11-25  0:00                     ` Robert I. Eachus
1998-11-26  0:00                       ` Simon Wright
1998-11-27  0:00                         ` David Botton
1998-11-27  0:00                           ` Tom Moran
1998-11-27  0:00                             ` Jerry van Dijk
1998-11-28  0:00                               ` Tom Moran
1998-11-27  0:00                           ` Mats Weber
1998-11-29  0:00                         ` Tucker Taft
1998-11-30  0:00                           ` Simon Wright
1998-11-25  0:00                     ` Jean-Pierre Rosen
1998-11-27  0:00                       ` Mats Weber
replies disabled

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