DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
UnixWare 7 and SCO OpenServer

prefix(D1)


prefix -- driver prefix

Synopsis

   int prefixclose();
   int prefixopen();
   . . .

Description

All DDI 7 and earlier drivers on UnixWare 7 and all &everest drivers; must define a unique prefix for symbol names. This enables the driver's named entry points to be identified by configuration software and decreases the possibility of global symbol collisions in the kernel.

Usage

A prefix should uniquely reference the vendor, chip set, or device. As a general rule, the prefix should closely resemble the driver's name, and should preface all error messages that the driver generates to make it easier for the administrator to determine the source of a message.

The driver prefix is specified in the ``prefix'' field of the UnixWare 7 driver's Master(4dsp) file or the SCO OpenServer, driver's mdevice(F) file. On UnixWare 7 the prefix is limited to 8 alpha-numeric characters.

For drivers that use a named entry point scheme, the driver's prefix is specified in a kernel module configuration file for the driver:

Symbol names for named driver entry points are constructed by concatenating the driver prefix with the name for the entry point.

DDI 8 drivers use the drvops(D4) structure in place of the named entry-point routine; STREAMS drivers for both UnixWare 7 and SCO OpenServer use the streamtab(D4str) structure rather than named entry points. Coding a driver with a prefix for all global resources is still a good practice with these drivers.

Examples

A DDI 7 or a SCO OpenServer character device driver using a driver prefix of ``xyz'' might define the following global functions to be used as its named entry points: xyzinit, xyzdevinfo, xyzopen, xyzclose, xyzread, xyzwrite, xyzioctl, and xyzintr. It would also define the variable xyzdevflag. Any other static and global symbols defined by this driver should also begin with ``xyz.''

Hardware applicability

All

Version applicability

ddi: in HDK Technical Reference 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp
oddi: in HDK Technical Reference 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

External dependencies

References

devflag(D1), Intro(D2), drvops(D4)

``Entry-point routines'' in HDK Technical Reference


29 September 2004
© 2004 The SCO Group, Inc. All rights reserved.
HDK 7.1.0b - 15 March 2000