[comp.sys.amiga.tech] YAWQ

dlarson@blake.acs.washington.edu (Dale Larson) (10/28/89)

/* comming soon to a theater near you:  Line Eater II, Trick or Treat! */

Yes, I have yet another wait() question.  Believe it or not, I have all 4
RKMs and the AutoDocs.  I even open them once in a while :-)

The program I'm working on needs to check the console for input, the serial
port for input, and a timeout timer.  I Wait() using the or'ed mask of all
of these message ports.  When input arrives (not a timer message), I need
to AbortIO()/WaitIO() the timeout timer so that I can reset it by CMD_ADDREQ
it again.  

Here is the problem.  I AbortIO() without error, but the WaitIO() returns
error -2 (IOERR_ABORTED).  According to the WaitIO() entry in the AutoDocs,
if my IO has finished "before this call, this function drops through 
immediately, with no call to Wait().  A side effect is that the signal bit
related the port may remain set.  Expect this."

It is definately the case that the signal bit is remaining set, because the
Wait() for con i/o or ser i/o or timeout is not pausing and is returning the
signal mask for the timer port (though it should be waiting 4 minutes).

Is the only way to reuse my timer request to close down the device and port
and re-open them???  Or have I (HOPEFULLY!) done something stupid again?


-- 
	    A lack of prior planning on the part of any programmer 
		       always constitutes an emergency.
	
           Digital Teddy Bear      dlarson@blake.acs.washington.edu