Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!oliveb!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga Subject: Re: Endless WaitIO() in VT100 Message-ID: <31537@sun.uucp> Date: Wed, 21-Oct-87 14:07:59 EDT Article-I.D.: sun.31537 Posted: Wed Oct 21 14:07:59 1987 Date-Received: Sat, 24-Oct-87 06:21:58 EDT References: <16584@amdahl.amdahl.com> Sender: news@sun.uucp Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 28 In article <16584@amdahl.amdahl.com> acs@amdahl.amdahl.com (Tony Sumrall) writes: } }Ed Puckett has zeroed in on an AbortIO()/WaitIO() bug that is present in }VT100 R2.7 but was present back in R2.6 days. The problem appears to be }that sometimes, after an AbortIO(), the subsequent WaitIO() is never }satisfied. Way back when this problem was originally discussed, Neil }Katin of Commodore said that the AbortIO() should be followed by a }Wait()/GetMsg() pair or, alternatively, a WaitIO() since the abort doesn't }remove the reply. Ed changed the WaitIO() with a GetMsg() call with no }intervening Wait() and, he reports, the problem disappears! } }Anyone got the straight scoop? Doesn't seem that, in a message passing }system, one should simply do a GetMsg() without a preceeding Wait(). Actually, there is a definite race condition when you use AbortIO to abort a request. Since the request may actually finish just before the call to AbortIO, if you then do a WaitIO you will never return because the there is no request there! So you probably want to add a call to CheckIO to make sure the request still exists before waiting on it, thus the code would look something like ... AbortIO(request); if (CheckIO(...)) WaitIO(request); --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you.