Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!cbmvax!randy From: randy@cbmvax.cbm.UUCP (Randy Weiner) Newsgroups: net.micro.amiga Subject: Re: Q on AbortIO() Message-ID: <297@cbmvax.cbmvax.cbm.UUCP> Date: Tue, 27-May-86 15:55:51 EDT Article-I.D.: cbmvax.297 Posted: Tue May 27 15:55:51 1986 Date-Received: Thu, 29-May-86 02:43:53 EDT References: <8605232153.AA01439@pavepaws> Reply-To: randy@cbmvax.UUCP (Randy Weiner) Organization: Commodore Technology, West Chester, PA Lines: 49 In article <8605232153.AA01439@pavepaws> dillon@PAVEPAWS.BERKELEY.EDU.UUCP writes: > Ok, AbortIO() Fails when the request has already completed. My >question is, when I call AbortIO() and it fails, will it still remove the >request from the reply port? or do I still have to WaitIO() ?????? > AbortIO only removes the request from the device queue, not from the reply queue. A reply is posted as if the IO had completed. The FLAG field is set to indicate an error (non-zero) and the IO_ERROR field has the IOERR_ABORTED bit set. In this case, since the request has already completed, the AbortIO fails and the flag field is 0. You should receive your reply in the expected fashion, meaning WaitIO should catch the almost aborted but completed request. You must still remove the reply (GetMsg(xxx)) yourself as WaitIO never removes a reply. > Next questions: If I call the sequence: > > AbortIO(); > WaitIO(); > > Will WaitIO() do the right thing when AbortIO() WORKS (e.g. actually > aborts the IO) > It should work because the AbortIO merely causes the specified request to terminate early and a reply to be posted to the ReplyPort. Remember to check the IO_Error field on all IO completions so you can be sure of its cause. >Serial Driver: > When AbortIO()ing read requests, is it possible to loose characters? >That is, if I abort a read request and it has already read 5 characters, will >io_Actual be 5 (so I can still get at what was read before the abort)? Or >will it throw the chars away. > You should be able to read the characters already read. AbortIO for the Serial device merely stops further IO from taking place. In the case of a read, the IO_Error field is set to indicate an abort, but the other fields are left intact. The information already there should remain. -- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Randy Weiner -- Commodore Business Machines <> uucp: {ihnp4|seismo|caip}!cbmvax!randy arpa: cbmvax!randy@seismo (or) randy@cbmvax.UUCP@{seismo | harvard} TEL: 215-431-9180