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

Switch tables

Switch tables are system data structures that are used to access named entry point routines in DDI drivers prior to version 8 and on SCO OpenServer 5 systems. A switch table contains the starting addresses for the principal routines included in all drivers. In a switch table, there is one row for each driver, and one column for each standard routine (logically, a 2-dimensional table). The kernel translates the arguments of the system call into a value used as an index into the switch table.

For example, when a user process issues a system call to open a device node, the major number associated with the node is used to index the switch table. Then, the open(D2) routine associated with the entry is invoked with the device number as an argument. This is illustrated below.

How named entry point routines are called

DDI 8 drivers do not use named entry point routines and so do not use switch tables to access their entry points. STREAMS drivers have never used named entry point routines; instead, they use the streamtab(D4str) structure to point to their entry points. SDI HBA drivers also have never used named entry points; they call the sdi_register(D3sdi) function and pass an hba_info(D4sdi) structure to point to their entry point routines.


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