Kernel Functions for Drivers ddiintrhilevel(9F)
NAME
ddiintrhilevel - indicate interrupt handler type
SYNOPSIS
#include
#include
int ddiintrhilevel(devinfot *dip, uintt inumber);
INTERFACE LEVEL
Solaris DI specific (Solaris DI). This interface is
obsolete. Use the new interrupt interfaces referenced in
Intro(9F). Refer to Writing Device Drivers for more informa-
tion.
PARAMETERS
dip Pointer to devinfo structure.
inumber Interrupt number.
DESCRIPTION
The ddiintrhilevel() function returns non-zero if the
specified interrupt is a "high level" interrupt.
High level interrupts must be handled without using system
services that manipulate thread or process states, because
these interrupts are not blocked by the scheduler.
In addition, high level interrupt handlers must take care to
do a minimum of work because they are not preemptable.
A typical high level interrupt handler would put data into a
circular buffer and schedule a soft interrupt by calling
dditriggersoftintr(). The circular buffer could be pro-
tected by using a mutex that was properly initialized for
the interrupt handler.
The ddiintrhilevel() function can be used before calling
ddiaddintr() to decide which type of interrupt handler
should be used. Most device drivers are designed with the
knowledge that the devices they support will always generate
low level interrupts, however some devices, for example
those using SBus or VME bus level 6 or 7 interrupts must use
SunOS 5.11 Last change: 16 Jan 2006 1
Kernel Functions for Drivers ddiintrhilevel(9F)
this test because on some machines those interrupts are high
level (above the scheduler level) and on other machines they
are not.
RETURN VALUES
non-zero indicates a high-level interrupt.
CONTEXT
These functions can be called from useruser, interrupt, or
kernel context.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Obsolete
SEE ALSO
ddiaddintr(9F), Intro(9F), mutex(9F)
Writing Device Drivers
SunOS 5.11 Last change: 16 Jan 2006 2
|