Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ddi_intr_get_pri(9f) [v7 man page]

ddi_intr_get_pri(9F)													      ddi_intr_get_pri(9F)

NAME
ddi_intr_get_pri, ddi_intr_set_pri - get or set priority of a given interrupt SYNOPSIS
#include <sys/types.h> #include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h> int ddi_intr_get_pri(ddi_intr_handle_t h, int *prip); int ddi_intr_set_pri(ddi_intr_handle_t h, int pri); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). ddi_intr_get_pri() h DDI interrupt handle prip Pointer to the priority returned for this handle ddi_intr_set_pri() h DDI interrupt handle pri Contains the priority to be set The ddi_intr_get_pri() function returns the current priority of the interrupt handle h of a given device. Upon a successful return, prip points to a small integer value, typically in the DDI_INTR_PRI_MIN...DDI_INTR_PRI_MAX range, that represents the current software priority setting for the interrupt. See <sys/ddi_intr.h> for values of DDI_INTR_PRI_MIN or DDI_INTR_PRI_MAX. The ddi_intr_get_pri() function can be called any time, even if the driver adds an interrupt handler for the interrupt specification. The software priority returned from ddi_intr_get_pri() can be used in calls to mutex_init() and rw_init(). The ddi_intr_set_pri() 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 ddi_intr_set_pri() function can only be called prior to adding the interrupt handler or when an interrupt handler is unassigned. DDI_FAILURE is returned in all other cases. The ddi_intr_get_pri() and ddi_intr_set_pri() functions return: DDI_SUCCESS On success. DDI_EINVAL On encountering invalid input parameters. DDI_FAILURE On any implementation specific failure. DDI_ENOTSUP On device not supporting operation. CONTEXT
The ddi_intr_get_pri() and ddi_intr_set_pri() functions can be called from kernel non-interrupt context. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ attributes(5), ddi_intr_alloc(9F), ddi_intr_enable(9F), mutex_init(9F), rw_init(9F) The priority returned from ddi_intr_get_pri() should be typecast to (void *)(uint64_t) before passing it on to mutex_init(9F). The double typecast is needed for AMD64 compilation. Consumers of these interfaces should verify that the return value is not equal to DDI_SUCCESS. Incomplete checking for failure codes could result in inconsistent behavior among platforms. 20 Apr 2005 ddi_intr_get_pri(9F)

Check Out this Related Man Page

ddi_intr_get_pri(9F)													      ddi_intr_get_pri(9F)

NAME
ddi_intr_get_pri, ddi_intr_set_pri - get or set priority of a given interrupt SYNOPSIS
#include <sys/types.h> #include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h> int ddi_intr_get_pri(ddi_intr_handle_t h, int *prip); int ddi_intr_set_pri(ddi_intr_handle_t h, int pri); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). ddi_intr_get_pri() h DDI interrupt handle prip Pointer to the priority returned for this handle ddi_intr_set_pri() h DDI interrupt handle pri Contains the priority to be set The ddi_intr_get_pri() function returns the current priority of the interrupt handle h of a given device. Upon a successful return, prip points to a small integer value, typically in the DDI_INTR_PRI_MIN...DDI_INTR_PRI_MAX range, that represents the current software priority setting for the interrupt. See <sys/ddi_intr.h> for values of DDI_INTR_PRI_MIN or DDI_INTR_PRI_MAX. The ddi_intr_get_pri() function can be called any time, even if the driver adds an interrupt handler for the interrupt specification. The software priority returned from ddi_intr_get_pri() can be used in calls to mutex_init() and rw_init(). The ddi_intr_set_pri() 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 ddi_intr_set_pri() function can only be called prior to adding the interrupt handler or when an interrupt handler is unassigned. DDI_FAILURE is returned in all other cases. The ddi_intr_get_pri() and ddi_intr_set_pri() functions return: DDI_SUCCESS On success. DDI_EINVAL On encountering invalid input parameters. DDI_FAILURE On any implementation specific failure. DDI_ENOTSUP On device not supporting operation. CONTEXT
The ddi_intr_get_pri() and ddi_intr_set_pri() functions can be called from kernel non-interrupt context. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ attributes(5), ddi_intr_alloc(9F), ddi_intr_enable(9F), mutex_init(9F), rw_init(9F) The priority returned from ddi_intr_get_pri() should be typecast to (void *)(uint64_t) before passing it on to mutex_init(9F). The double typecast is needed for AMD64 compilation. Consumers of these interfaces should verify that the return value is not equal to DDI_SUCCESS. Incomplete checking for failure codes could result in inconsistent behavior among platforms. 20 Apr 2005 ddi_intr_get_pri(9F)
Man Page