DoAsyncReadWrite
Starts an asynchronous read or write operation.
Declaration
virtual kern_return_t DoAsyncReadWrite(bool isRead, uint32_t requestID, uint64_t dmaAddr, uint64_t size, uint64_t lba, uint64_t numOfBlocks, IOUserStorageOptions options);Parameters
- requestID:
An opaque identifier. After the dext completes the request, it calls Completeio and sends this value as a parameter.
- dmaAddr:
The DMA address of the data buffer.
- size:
The size of the data buffer.
- lba:
The start logical block number.
- numOfBlocks:
The number of blocks to read or write.
- options:
Data transfer options. These can be any combination of
kIOUserStorage…values (defined in Iouserstorageoptions) combined together with the logicalORoperator.
Return Value
A value that indicates the result of the read/write operation. kIOReturnSuccess indicates success. For error definitions, see IOKit Constants.
Discussion
When the read or write operation completes, the dext calls your CompleteIO method with the results of the operation.