DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

drv_attach(D3)


drv_attach -- register a driver and its entry points

Synopsis

   #include <sys/types.h>
   #include <sys/ddi.h>
   

int drv_attach(const drvinfo_t *infop);

Description

drv_attach( ) registers a driver and its entry points and makes its drvinfo(D4) structure visible to the system.

Arguments


infop
Pointer to the driver's drvinfo(D4) structure

Return values

The drv_attach( ) function returns 0 for success, or the appropriate non-zero error number from errnos(D5).

Usage

drv_attach( ) is called from the driver's _load(D2) entry-point routine. No other entry point routines will be called until drv_attach( ) has been called.

drv_attach( ) must be passed the correct module name. This is accomplished by having the drvinfo structure use MODNAME for the drv_name member. See Space.c(DSP/4dsp) for more information about MODNAME.

Context and synchronization

User or blockable context.

Hardware applicability

All

Version applicability

ddi: 8, 8mp

References

drv_detach(D3), drvinfo(D4), Space.c(DSP/4dsp)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005