Path: utzoo!attcan!uunet!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga Subject: Re: Modem/VT100 problem Message-ID: <4058@cbmvax.UUCP> Date: 18 Jun 88 19:10:02 GMT References: <8806180105.AA07445@cory.Berkeley.EDU> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 45 In article <8806180105.AA07445@cory.Berkeley.EDU> dillon@CORY.BERKELEY.EDU (Matt Dillon) writes: > The only possible way this could cause a lock up is if the >signal got cleared AFTER the IO request completed but BEFORE the Wait(). >AbortIO() itself does not munge with the signals. The only way the >signal can be cleared is if VT100 clears it somewhere (via Wait(), for >instance). Or by doing a WaitIO or DoIO for another request that uses the same port. > Besides all that there is absolutely no reason to put a Wait() >before WaitIO(). WaitIO() works no matter what the state of the signal >bit is. This is exactly right. However, a program may wish to Wait() if it KNOWS it will be signaled, so it can handle other tasks while waiting. The best way to KNOW you will be signaled is to CheckIO. If it hasn't completed, you will be signaled when it does. > A common problem which you might look for is the programmer >forgetting set the node type of the IO request to NT_MESSAGE before >SendIO(), BeginIO(), or DoIO() (not sure about needing it in DoIO()). >PutMsg() does this for you, but SendIO()/BeginIO()/DoIO() usually don't >(it depends on the device). VERY good point, very often missed. This should be documented better: If in doubt, set the ln_Type to NT_MESSAGE before doing SendIO, BeginIO, or DoIO. Most devices will set it for you, but it's safer to do it yourself. If you write a device, have your BeginIO vector set it or the System Police will come looking for you. :-) > Just as PutMsg() sticks in NT_MESSAGE automatically, ReplyMsg() >sticks in NT_REPLYMSG or NT_FREEMSG automatically. This is how WaitIO() >figures out whether the request has been returned by the device yet or not. >(IOF_QUICK is also checked but that's another story). Since one doesn't >PutMsg() to the IO device, one must set ln_Type to NT_MESSAGE manually before >every SendIO()/BeginIO()/DoIO(). > -Matt Well said, Matt. (Have you been disassembling the roms again? naughty naughty :-) Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup