[net.micro.amiga] Q. on signals

dillon@PAVEPAWS.BERKELEY.EDU (Matt Dillon) (05/24/86)

	If I WaitIO() on a completed request, will it clear the signal bit?
NOTE: I DID NOT do a Wait(),  just a WaitIO().  Additionaly, will a
SendIO() clear the signal bit before starting the operation?  

	Will the signal bit be cleared after a DoIO() ?

						Thanks,

						-Matt

randy@cbmvax.cbm.UUCP (Randy Weiner) (05/27/86)

In article <8605232155.AA01454@pavepaws> dillon@PAVEPAWS.BERKELEY.EDU.UUCP writes:
>       If I WaitIO() on a completed request, will it clear the signal bit?
>NOTE: I DID NOT do a Wait(),  just a WaitIO().

        First, even though you do not explicitly call Wait(), the
function WaitIO() does call Wait(), so effectively they work the same.

        Wait() will clear the signal bit and return the bit that caused
a task to wake-up, e.g. waiting for a reply indicating that some IO
operation has completed. This same info is also passed back to WaitIO().

>Additionaly, will a SendIO() clear the signal bit before starting the
>operation?

        No, SendIO() is an asynchronous operation (unless the IOQUICK
flag is set). It merely posts the request and returns.

>       Will the signal bit be cleared after a DoIO() ?

        Yes it is cleared. DoIO is synchronous. Your task is put to
sleep until the proper signal is detected. DoIO queues the IO request
via BEGINIO, then does a WaitIO. As before, the code for Wait() is
executed and so the signal bit is effectively cleared upon return
to your task, i.e. after a DoIO, but before your next line of code
is hit.


--
     + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Randy Weiner -- Commodore Business Machines <<Amiga Technical Support>>
                uucp: {ihnp4|seismo|caip}!cbmvax!randy
                arpa: cbmvax!randy@seismo
                (or)  randy@cbmvax.UUCP@{seismo | harvard}
                TEL:  215-431-9180

neil@amiga.UUCP (Neil Katin) (05/27/86)

In article <8605232155.AA01454@pavepaws> dillon@PAVEPAWS.BERKELEY.EDU (Matt Dillon) writes:
>
>	If I WaitIO() on a completed request, will it clear the signal bit?
>NOTE: I DID NOT do a Wait(),  just a WaitIO().  Additionaly, will a
>SendIO() clear the signal bit before starting the operation?  
>
>	Will the signal bit be cleared after a DoIO() ?
>
>						Thanks,
>
>						-Matt

The signal bit is NOT guaranteed to be cleared.  As a matter of fact,
one should never depend on signals to tell when IO is done.

WaitIO first checks to see if the IOB_QUICK bit is set.  Then it checks
to see if the request has been replied.  Then, and only then, does
it do a Wait() on the port's signal bit.

A signal bit may represent many IO requests (if they arrived before you
noticed them) or may not be set at all (if you are allowing QUICK io).
In addition, many calls don't clear the signal bit if the call can tell
that operation has already finished.

Signal bits are an indication that you should look further at a port,
not that something has actually happened.

	Neil Katin
	Commodore-Amiga