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

init(D2)


init -- initialize a static device driver

Synopsis (Not in current DDI version)

   void prefixinit(void);

Description

The driver's init( ) entry point routine is called during system initialization to initialize the driver and the devices it controls. init( ) is a named entry point and must be defined as a global symbol.

Return values

None

Usage

This entry point is optional. It is never called for dynamically loadable drivers.

Although init( ) and start( ) routines both perform initialization tasks, they execute at different times during system start-up. For this reason, they should be used to handle different types of initialization tasks.

init( ) routines:

start( ) routines:

Types of activities performed by the init( ) routine include initializing data structures, allocating memory for private data, mapping the device into virtual address space, and initializing hardware. The init( ) routine can only call kernel functions that are can run in initialization context in HDK Technical Reference. Context information is provided on the manual page for each kernel function.

init( ) routines for dynamically loadable modules are not called during system start-up as they are for statically linked modules. A loadable module's initialization is performed by its _load(D2) routine, which is called each time the module is loaded into a running system. However, if the processing done by a module's init( ) routine when the module is configured as a statically linked module can also be used when the module is configured as a loadable module, the module can call its init( ) routine from its load( ) routine.

Context and synchronization

Initialization context. Most system facilities are not available and interrupt detection is not enabled.

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp

Differences between versions

Starting with DDI version 8, the init( ) entry point routine is no longer supported. Instead, _load(D2) is always called to initialize drivers.

External dependencies

Named entry point routines must be declared in the driver's Master(DSP/4dsp) file. The declaration for this entry point is $entry init.

References

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