Generic Block Interface Reference Manual
The Generic Block Interface provides the interface used by DROPS block device drivers. The interface provides both best-effort and real-time (stream) block requests.
The Generic Block IDL interface is an asynchronous interface. That means clients do not block until a request is processed by a driver. Instead, clients immediately return after sending the request to a driver and get a notification if a request is processed at a later time. The Generic Block Interface consists of three IDL interfaces, a Request Interface
to send requests to a driver, a Notification Interface
to wait for a notification from a driver and a Driver Interface
to setup the other interfaces.
The client library (libgeneric_blk) implements several functions to use block device drivers. In particular, it implements a mechanism to wait for the notifications from a driver. The library uses a separate thread to wait for the notifications from a driver and notifies the client by either executing a callback function or incrementing a semaphore which both can be specified by the client. The same mechanism is used by the library to provide a synchronous request function.
The server library (libgeneric_blk-server) provides the skeleton functions generated by the IDL compiler which must be used to implement a block device driver.