Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!telepro!oliphant From: oliphant@telepro.UUCP (Mike Oliphant) Newsgroups: comp.sys.amiga.programmer Subject: Re: Question on AbortIO() and WaitIO() Message-ID: Date: 24 May 91 05:31:31 GMT References: <28630@uflorida.cis.ufl.EDU> <21757@cbmvax.commodore.com> Organization: TelePro Technologies Lines: 40 In article <21757@cbmvax.commodore.com> carolyn@cbmvax.commodore.com (Carolyn Scheppner - CATS) writes: >If you KNOW there is an outstanding request, I believe the best >action is: > >if(!CheckIO(ioreq)) AbortIO(ioreq); >WaitIO(ioreq); The CheckIO() is EXTREMELY important with the A2232 serial card - it doesn't like you aborting requests that have been satisfied. In fact, it seems that even the CheckIO() safety measure is not enough with this card. I've found this method solves the problem: NiceAbort(ioreq) struct IORequest *ioreq; { Forbid(); if(!CheckIO(ioreq)) AbortIO(ioreq); Permit(); WaitIO(ioreq); } A program called 'A2232Patch' by Reid Bishop uses SetFunction() to turn all AbortIO() calls into NiceAborts. Without this patch, doing complex things with the serial port (such as spawning a BBS from a front-end FidoNet mailer) is likely to fail miserably on the A2232 (unless the software in question does NiceAborts itself). Hopefully, this bug in the A2232 will be fixed (the standard serial.device has no such problem) and these contortions will be rendered unneccesary. -- Mike Oliphant telepro!oliphant@herald.usask.ca or herald!telepro!oliphant FidoNet: (1:140/91) - ZMH only * * Call TelePro, the development system for DLG Professional * * Phone: +1 306 249 2352 2400/9600/14400 bps HST - FidoNet: (1:140/90) * +1 306 652 2084 300/1200/2400 bps *