DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
HDK Technical Reference

Device instance

The device instance is an abstraction introduced in DDI 8. It is a handle that is returned by the CFG_ADD subfunction of the config(D2) entry point as an idata value, and is passed back to the driver as an argument to all subsequent entry point routines that are related to this device instance.

Logically, this is the equivalent to passing the resource manager key to every entry point, but allows the driver to access static cached information without incurring the cost of accessing the resource manager database on every operation. The driver can store any instance information it needs in its idata and access this information as needed. The kernel itself does not acess the idata contents, but instead passes the idata as an oblique handle.

The device instance corresponds to a specific piece of hardware, whereas the channel (see ``Channel number'') represents a mode of that hardware. For example, a tape device would be represented by a device instance, but different modes (rewind on close, for example) are represented by different channels to that device instance.

When implementing open redirection (``cloning'') as discussed on the open(D2) manual page, the cloning device needs a single node, corresponding to a single idata; the driver then clones multiple channels out of that node.


© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005