Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
#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, uint_t *prip);
int ddi_intr_set_pri(ddi_intr_handle_t h, uint_t pri);
DDI interrupt handle
Pointer to the priority returned for this handle
ddi_intr_set_pri() h
DDI interrupt handle
Contains the priority to be set
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.
On success.
On encountering invalid input parameters.
On any implementation specific failure.
On device not supporting operation.
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Committed |
Writing Device Drivers
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.