State-Based Interaction

Although the approach of getting and setting driver properties provides a very easy way to interact with a driver and a hardware device, it is rather inflexible, which makes it suitable only for very specific uses. The I/O Kit Framework provides another method for interacting with drivers from user space applications that is based on a connection between a user application and the driver. The use of a connection allows the driver to determine which user application a request has originated from and can therefore associate a state with the connection. (Alternatively, because an application can have multiple connections open to a driver, the driver can determine which connection a request is originating from.) This allows ...

Get OS X and iOS Kernel Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.