comp.lang.ada
 help / color / mirror / Atom feed
From: Vincent Smeets <VSmeets@meppen.sema.slb.com>
Subject: Re: Abort of C-code in a asynchronous_select
Date: Wed, 05 Dec 2001 07:15:57 +0100
Date: 2001-12-05T07:15:57+01:00	[thread overview]
Message-ID: <3C0DBB9D.F97D1CE7@meppen.sema.slb.com> (raw)
In-Reply-To: 3C0CE8F1.31F74C6@canal-plus.fr

Thierry Lelegard wrote:
> 
> > select
> >    State.Not_Active;
> > then abort
> >    C_Driver.Read (Data, Data_Last);
> > end select;
> >
> > I am assuming that in case the Read-call is aborted, the semaphore in C
> > isn't freed because C doesn't know anything about the Ada-abort. Am I
> > correct and how can I do it better?
> 
> It entirely depends on the operating system and the implementation
> of the Ada95 runtime. In your specific case, you can't even be sure
> that the Read call is aborted. It may block until the read completes
> (ie. the abort is ineffective).

Thanks,

I have redisgned it already for not using an ATC. I was thinking myself
of it as a too great risk of being system-dependent.

As a note: I am using GNAT 3.13p on Solaris 2.6 and the C_Driver.Read
routine isn't directly a Solaris driver but an emulation of an
driver/device written in C with sockets. Later the Ada software shall
run on an embedded system with pSOS+.


-- 
Vincent Smeets
SchlumbergerSema -
Competence Center Informatik GmbH 
Lohberg 10 - 49716 Meppen - Germany
tel:  +49 5931-805-461
fax:  +49 5931-805-175
mail: VSmeets@slb.com
web:  www.cci.de



  parent reply	other threads:[~2001-12-05  6:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-04 14:00 Abort of C-code in a asynchronous_select Vincent Smeets
2001-12-04 15:17 ` Thierry Lelegard
2001-12-05  3:31   ` Robert Dewar
2001-12-05  6:15   ` Vincent Smeets [this message]
2001-12-05  8:59     ` Thierry Lelegard
replies disabled

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