Err DoIO( Item ior, const IOInfo *ioiP )
DoIO()
automatically sets the IO_QUICK flag in the IOInfo structure. This flag specifies quick I/O, which works as follows: The kernel tries to perform the I/O operation immediately and, if it is successful, it sends back the resulting IOReq immediately and returns 1 as the result code. The calling task can then get the necessary information from the IOReq. If quick I/O is not successful, the kernel performs normal asynchronous I/O and notifies the task with a signal or message when the I/O request is complete. This wakes up the task and DoIO() returns.
Starting with kernel folio V24, this function will automatically sample the io_Error field of the I/O request and return this to you. It is, therefore, no longer necessary to have code such as:
You can now just look at the return value of
err = DoIO(iorItem,&ioinfo);
0r err = DoIO(iorItem,&ioinfo);
if (err >= 0)
err = ior->io_Error;
DoIO()
.
AbortIO
(), CheckIO(), CreateIOReq(), DeleteIOReq(), SendIO(), WaitIO()