'\" te .\" Copyright (c) 2005, 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] .TH DDI_INTR_GET_PENDING 9F "Apr 7, 2005" .SH NAME ddi_intr_get_pending \- get pending bit for a given interrupt .SH SYNOPSIS .LP .nf #include #include #include #include \fBint\fR \fBddi_intr_get_pending\fR(\fBddi_intr_handle_t\fR \fIh\fR, \fBint *\fR\fIpendingp\fR); .fi .SH INTERFACE LEVEL .sp .LP Solaris DDI specific (Solaris DDI). .SH PARAMETERS .sp .ne 2 .na \fB\fIh\fR\fR .ad .RS 12n DDI interrupt handle .RE .sp .ne 2 .na \fB\fIpendingp\fR\fR .ad .RS 12n Pointer to the pending capability returned for this handle .RE .SH DESCRIPTION .sp .LP The \fBddi_intr_get_pending()\fR function returns non-zero as the integer pointed to by the \fIpendingp\fR argument if a corresponding interrupt is pending. The corresponding interrupt handle \fIh\fR must already be allocated. The call succeeds if the device or host bridge supports the ability to read the interrupt pending bits of its interrupts. The driver should use \fBddi_intr_get_cap()\fR function to see if the \fBDDI_INTR_FLAG_PENDING\fR flag is returned to indicate that interrupts support interrupt pending bits. .sp .LP If the \fBDDI_INTR_FLAG_PENDING\fR capability is not supported, \fBddi_intr_get_pending()\fR returns \fBDDI_ENOTSUP\fR and zero in \fIpendingp\fR. .SH RETURN VALUES .sp .LP The \fBddi_intr_get_pending()\fR function returns: .sp .ne 2 .na \fB\fBDDI_SUCCESS\fR\fR .ad .RS 15n On success. .RE .sp .ne 2 .na \fB\fBDDI_EINVAL\fR\fR .ad .RS 15n On encountering invalid input parameters. .RE .sp .ne 2 .na \fB\fBDDI_FAILURE\fR\fR .ad .RS 15n On any implementation specific failure. .RE .sp .ne 2 .na \fB\fBDDI_ENOTSUP\fR\fR .ad .RS 15n On device not supporting operation. .RE .SH CONTEXT .sp .LP The \fBddi_intr_get_pending()\fR function can be called from either user or kernel non-interrupt context. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Evolving .TE .SH SEE ALSO .sp .LP \fBattributes\fR(5), \fBddi_intr_block_enable\fR(9F), \fBddi_intr_block_disable\fR(9F), \fBddi_intr_clr_mask\fR(9F), \fBddi_intr_disable\fR(9F), \fBddi_intr_enable\fR(9F), \fBddi_intr_set_mask\fR(9F) .sp .LP \fIWriting Device Drivers\fR .SH NOTES .sp .LP Any consumer of this interface should verify that the return value is not equal to \fBDDI_SUCCESS\fR. Incomplete checking for failure codes could result in inconsistent behavior among platforms.