From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6b7062ec13fd16a9,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-04 06:01:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.online.be!195.129.110.18.MISMATCH!bnewspeer00.bru.ops.eu.uu.net!bnewsifeed00.bru.ops.eu.uu.net!bnewsifeed01.bru.ops.eu.uu.net!bnewspost00.bru.ops.eu.uu.net!emea.uu.net!read.news.de.uu.net!not-for-mail Message-ID: <3C0CD717.F720A1DB@meppen.sema.slb.com> Date: Tue, 04 Dec 2001 15:00:55 +0100 From: Vincent Smeets Organization: CCI - SchlumbergerSema X-Mailer: Mozilla 4.77 [en] (X11; U; SunOS 5.6 sun4m) X-Accept-Language: nl, en, de MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Abort of C-code in a asynchronous_select Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: zerberus.cci.de X-Trace: 1007474456 read.news.de.uu.net 187 193.103.165.100 X-Complaints-To: abuse@de.uu.net Xref: archiver1.google.com comp.lang.ada:17381 Date: 2001-12-04T15:00:55+01:00 List-Id: 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