2 .\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH DDI_INTR_GET_PENDING 9F "Apr 7, 2005"
8 ddi_intr_get_pending \- get pending bit for a given interrupt
12 #include <sys/types.h>
15 #include <sys/sunddi.h>
17 \fBint\fR \fBddi_intr_get_pending\fR(\fBddi_intr_handle_t\fR \fIh\fR, \fBint *\fR\fIpendingp\fR);
23 Solaris DDI specific (Solaris DDI).
40 Pointer to the pending capability returned for this handle
46 The \fBddi_intr_get_pending()\fR function returns non-zero as the integer
47 pointed to by the \fIpendingp\fR argument if a corresponding interrupt is
48 pending. The corresponding interrupt handle \fIh\fR must already be allocated.
49 The call succeeds if the device or host bridge supports the ability to read the
50 interrupt pending bits of its interrupts. The driver should use
51 \fBddi_intr_get_cap()\fR function to see if the \fBDDI_INTR_FLAG_PENDING\fR
52 flag is returned to indicate that interrupts support interrupt pending bits.
55 If the \fBDDI_INTR_FLAG_PENDING\fR capability is not supported,
56 \fBddi_intr_get_pending()\fR returns \fBDDI_ENOTSUP\fR and zero in
61 The \fBddi_intr_get_pending()\fR function returns:
65 \fB\fBDDI_SUCCESS\fR\fR
74 \fB\fBDDI_EINVAL\fR\fR
77 On encountering invalid input parameters.
83 \fB\fBDDI_FAILURE\fR\fR
86 On any implementation specific failure.
92 \fB\fBDDI_ENOTSUP\fR\fR
95 On device not supporting operation.
101 The \fBddi_intr_get_pending()\fR function can be called from either user or
102 kernel non-interrupt context.
106 See \fBattributes\fR(5) for descriptions of the following attributes:
114 ATTRIBUTE TYPE ATTRIBUTE VALUE
116 Interface Stability Evolving
122 \fBattributes\fR(5), \fBddi_intr_block_enable\fR(9F),
123 \fBddi_intr_block_disable\fR(9F), \fBddi_intr_clr_mask\fR(9F),
124 \fBddi_intr_disable\fR(9F), \fBddi_intr_enable\fR(9F),
125 \fBddi_intr_set_mask\fR(9F)
128 \fIWriting Device Drivers\fR
132 Any consumer of this interface should verify that the return value is not equal
133 to \fBDDI_SUCCESS\fR. Incomplete checking for failure codes could result in
134 inconsistent behavior among platforms.