comp.lang.ada
 help / color / mirror / Atom feed
* Abort of C-code in a asynchronous_select
@ 2001-12-04 14:00 Vincent Smeets
  2001-12-04 15:17 ` Thierry Lelegard
  0 siblings, 1 reply; 5+ messages in thread
From: Vincent Smeets @ 2001-12-04 14:00 UTC (permalink / raw)


Hallo,

I have a driver for reading and writing data written in C. The
C-routines are protected with a semaphores against being called by two
threads at the same time. The code can't be changed.

I want to call the blocking C-Driver.Read routine from Ada but must be
able to abort the call in case of an application state change. I was
thinking of the statements:

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?

-- 
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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-12-05  8:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2001-12-05  8:59     ` Thierry Lelegard

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