next up previous contents index
Next: 5.3.1 getblocksize: Return the Up: 5 Input/Output Interfaces Previous: 5.2 oskit_asyncio: Asynchronous I/O

5.3 oskit_blkio: Block I/O Interface

   

The oskit_blkio interface supports reading and writing of raw data in units of fixed-sized blocks which are some power of two. This interface is identical to the oskit_absio interface except for the addition of a getblocksize method; in fact, an object that supports byte-granularity reads and writes can easily export both oskit_blkio and oskit_absio using exactly the same function pointer table, simply by implementing an oskit_blkio interface that always returns one from getblocksize, and then returning a pointer to that interface on queries for either oskit_blkio or oskit_absio.

The oskit_blkio interface inherits from IUnknown, and has the following additional methods:

getblocksize
Return the minimum block size of this block I/O object.
read
Read from this object, starting at the specified offset.
write
Write to this object, starting at the specified offset.
getsize
Get the current size of this object.
setsize
Set the current size of this object.





University of Utah Flux Research Group