Docs » Autodocs » exec.library » CheckIO
CheckIO -- get the status of an IORequest
result = CheckIO(iORequest) D0 A1 struct IORequest *CheckIO(struct IORequest *);
This function determines the current state of an I/O request and returns FALSE if the I/O has not yet completed. This function effectively hides the internals of the I/O completion mechanism. CheckIO() will NOT remove the returned IORequest from the reply port. This is best performed with WaitIO(). If the request has already completed, WaitIO() will return quickly. Use of the Remove() function is dangerous, since other tasks may still be adding things to your message port; a Disable() would be required. This function should NOT be used to busy loop (looping until IO is complete). WaitIO() is provided for that purpose.
iORequest - pointer to an I/O request block
result - NULL if I/O is still in progress. Otherwise D0 points to the IORequest block.
Previously, CheckIO() used to be documented to return a BOOL result. This was incorrect.
CheckIO can hang if called on an IORequest that has never been used. This occurs if LN_TYPE of the IORequest is set to "NT_MESSAGE". Instead simply set LN_TYPE to 0.
DoIO(), SendIO(), WaitIO(), AbortIO()
|