Waits for an I/O request to complete.
Err WaitIO( Item ior )
The procedure puts the calling task into wait state until the specified I/O request completes. When a task is in wait state, it uses no CPU time.
Note: If the I/O request has already completed, the procedure returns immediately. If the I/O request never completes and it is not aborted, the procedure never returns.
Starting with kernel folio V24, this function will automatically sample the io_Error field of the IO request, and return this to you. It is, therefore, no longer necessary to have code such as:
err = WaitIO(iorItem); if (err > = 0)
err = ior->io_Error;
You can now just look at the return value of WaitIO()
.
The procedure returns a value greater than or equal to 0 if the I/O request was successful or an error code if an error occurs.
Convenience call implemented in clib.lib V20. Became a SWI in kernel folio V24.