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 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-04 22:15:59 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fr.clara.net!heighliner.fr.clara.net!newsfeed.online.be!195.129.110.18.MISMATCH!bnewspeer00.bru.ops.eu.uu.net!bnewsifeed02.bru.ops.eu.uu.net!bnewspost00.bru.ops.eu.uu.net!emea.uu.net!read.news.de.uu.net!not-for-mail Message-ID: <3C0DBB9D.F97D1CE7@meppen.sema.slb.com> Date: Wed, 05 Dec 2001 07:15:57 +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: Re: Abort of C-code in a asynchronous_select References: <3C0CD717.F720A1DB@meppen.sema.slb.com> <3C0CE8F1.31F74C6@canal-plus.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: zerberus.cci.de X-Trace: 1007532958 read.news.de.uu.net 185 193.103.165.100 X-Complaints-To: abuse@de.uu.net Xref: archiver1.google.com comp.lang.ada:17430 Date: 2001-12-05T07:15:57+01:00 List-Id: 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