Driver entry point routines for I/O operations are activated by I/O system calls, as illustrated below. ``DDI 8 entry points and system calls''.
DDI 8 entry points and system calls
The process of calling the appropriate DDI 8 driver routine can be summarized as follows
A file descriptor returned as part of an open( ) call is mapped internally into the driver instance and channel. The user process uses a file descriptor for the device, and this file descriptor is translated to an instance/channel pair that is used to index the tables during read() and write() syste call operations, and is also made available as arguments to the device's entry points routines that are called in response to a system call request.
Additional entry point routines are defined for specialized interfaces such as STREAMS and SDI. Other structures provide access to these entry points. For example, the STREAMS entry points are accessed through the streamtab(D4str) structure and the entry points for SDI Host Bus Adapters (HBAs) are accessed through the hba_info(D4sdi) structure.
Not all entry points are appropriate for all devices. For instance, a printer driver does not need a read( ) entry point routine. The operating system provides pointers to stub functions in the switch tables for routines that are not included in the driver.