.TH init "" "" "Entry-Point Routine"
.PC "Initialize a device"
\fBvoid \fIprefix\fBinit();\fR
.PP
.B init
is the entry point to the routine with which the driver
initializes its device.
The kernel invokes this routine when it is booted.
The related entry point,
.BR start ,
can be invoked after the system has been booted.
.PP
The
.B init
routine is executed before interrupts are enabled.
It must not sleep, nor may it call any function that sleeps or
requires user context.
.PP
An
.B init
routine can call the following DDI/DKI kernel functions:
.DS
.ta 0.5i 2.25i 4.0i
.B
	ASSERT()	getmajor()	makedevice()
	bcopy()	getminor()	outb()
	bzero()	inb()	outl()
	cmn_err()	inl()	outw()
	drv_getparm()	inw()	phalloc()
	drv_hztoused()	itoemajor()	phfree()
	drv_usectohz()	kmem_alloc()	repinsw()
	etoimajor()	kmem_free()	repoutsb()
	getemajor()	kmem_zalloc()	repoutsw()
	geteminor()	LOCK_ALLOC()	SLEEP_ALLOC()
.R
.DE
.SH "See Also"
.B
entry-point routines,
start
.R
.SH Notes
This entry-point is used only by the DDI/DKI interface.
It is optional.
