Kernel Functions for Drivers ddiintrsetmask(9F)
NAME
ddiintrsetmask, ddiintrclrmask - set or clear mask for
a given interrupt
SYNOPSIS
#include
#include
#include
#include
int ddiintrsetmask(ddiintrhandlet h);
int ddiintrclrmask(ddiintrhandlet h);
INTERFACE LEVEL
Solaris DI specific (Solaris DI).
PARAMETERS
h DI interrupt handle
DESCRIPTION
The ddiintrsetmask() function masks the given interrupt
pointed to by the device's interrupt handle h if the device
or host bridge supports the masking operation. The
ddiintrgetcap() function returns the RO flag
DINTRFLAGMASKABLE if the device or host bridge supports
interrupt mask bits for the given interrupt type. In flight
interrupts can still be taken and delivered to the driver.
The ddiintrclrmask() function unmasks the given interrupt
pointed by the device's interrupt handle h if the device or
host bridge supports the masking operation.
The ddiintrsetmask() and ddiintrclrmask() functions
should be called only if an interrupt is enabled. Otherwise
the framework will return DIEINVAL to such calls.
The mask cannot be cleared directly if the OS implementation
has also temporarily masked the interrupt. A call to
ddiintrclrmask() must be preceded by a call to
ddiintrsetmask(). It is not necessary to call
ddiintrclrmask() when adding and enabling the interrupt.
RETURN VALUES
The ddiintrsetmask() and ddiintrclrmask() functions
return:
SunOS 5.11 Last change: 05 Apri 2006 1
Kernel Functions for Drivers ddiintrsetmask(9F)
DISUCES On success.
DIEINVAL On encountering invalid input parameters or
when an interrupt is not enabled.
DIFAILURE On any implementation specific failure.
DIENOTSUP On device not supporting operation.
CONTEXT
The ddiintrsetmask() and ddiintrclrmask() functions
can be called from any context.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
SEE ALSO
attributes(5), ddiintrblockdisable(9F),
ddiintrblockenable(9F), ddiintrdisable(9F),
ddiintrenable(9F), ddiintrgetpending(9F)
Writing Device Drivers
NOTES
Consumers of these interfaces should verify that the return
value is not equal to DISUCES. Incomplete checking for
failure codes could result in inconsistent behavior among
platforms.
SunOS 5.11 Last change: 05 Apri 2006 2
|