Kernel Functions for Drivers ddiintrgetpri(9F)
NAME
ddiintrgetpri, ddiintrsetpri - get or set priority of
a given interrupt
SYNOPSIS
#include
#include
#include
#include
int ddiintrgetpri(ddiintrhandlet h, uintt *prip);
int ddiintrsetpri(ddiintrhandlet h, uintt pri);
INTERFACE LEVEL
Solaris DI specific (Solaris DI).
PARAMETERS
ddiintrgetpri()
h DI interrupt handle
prip Pointer to the priority returned for this handle
ddiintrsetpri()
h DI interrupt handle
pri Contains the priority to be set
DESCRIPTION
The ddiintrgetpri() function returns the current priority
of the interrupt handle h of a given device. Upon a success-
ful return, prip points to a small integer value, typically
in the DINTRPRIMIN...DINTRPRIMAX range, that
represents the current software priority setting for the
interrupt. See for values of
DINTRPRIMIN or DINTRPRIMAX.
The ddiintrgetpri() function can be called any time, even
if the driver adds an interrupt handler for the interrupt
specification.
SunOS 5.11 Last change: 04 Jun 2007 1
Kernel Functions for Drivers ddiintrgetpri(9F)
The software priority returned from ddiintrgetpri() can
be used in calls to mutexinit() and rwinit().
The ddiintrsetpri() function sets the priority pri of the
interrupt handle h of a given device. The function validates
that the argument is within the supported range.
The ddiintrsetpri() function can only be called prior to
adding the interrupt handler or when an interrupt handler is
unassigned. DIFAILURE is returned in all other cases.
RETURN VALUES
The ddiintrgetpri() and ddiintrsetpri() functions
return:
DISUCES On success.
DIEINVAL On encountering invalid input parameters.
DIFAILURE On any implementation specific failure.
DIENOTSUP On device not supporting operation.
CONTEXT
The ddiintrgetpri() and ddiintrsetpri() functions can
be called from kernel non-interrupt context.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
SEE ALSO
attributes(5), ddiintralloc(9F), ddiintrenable(9F),
mutexinit(9F), rwinit(9F)
SunOS 5.11 Last change: 04 Jun 2007 2
Kernel Functions for Drivers ddiintrgetpri(9F)
Writing Device Drivers
NOTES
The priority returned from ddiintrgetpri() should be
typecast by calling the DINTRPRI macro before passing it
onto mutexinit(9F).
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: 04 Jun 2007 3
|