1 '\" te
2 .\" Copyright (c) 2006, 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_NINTRS 9F "Nov 13, 2006"
7 .SH NAME
8 ddi_intr_get_nintrs, ddi_intr_get_navail \- return number of interrupts
9 supported or available for a given interrupt type
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/types.h>
14 #include <sys/conf.h>
15 #include <sys/ddi.h>
16 #include <sys/sunddi.h>
17
18 \fBint\fR \fBddi_intr_get_nintrs\fR(\fBdev_info_t *\fR\fIdip\fR, \fBint\fR \fItype\fR, \fBint *\fR\fInintrsp\fR);
19 .fi
20
21 .LP
22 .nf
23 \fBint\fR \fBddi_intr_get_navail\fR(\fBdev_info_t *\fR\fIdip\fR, \fBint\fR \fItype\fR, \fBint *\fR\fInavailp\fR);
24 .fi
25
26 .SH INTERFACE LEVEL
97 the given \fItype\fR supported by a particular hardware device. On a successful
98 return, the number of supported interrupts is returned as an integer pointed to
99 by the \fInintrsp\fR argument.
100 .sp
101 .LP
102 If the hardware device is not found to support any interrupts of the given
103 \fItype\fR, the \fBDDI_INTR_NOTFOUND\fR failure is returned rather than a zero
104 in \fInintrsp\fR.
105 .sp
106 .LP
107 The \fBddi_intr_get_navail()\fR function returns the number of interrupts of a
108 given \fItype\fR that is available to a particular hardware device. On a
109 successful return, the number of available interrupts is returned as an integer
110 pointed to by \fInavailp\fR.
111 .sp
112 .LP
113 The hardware device may support more than one interrupt and can request that
114 all interrupts be allocated. The host software can then use policy-based
115 decisions to determine how many interrupts are made available to the device.
116 Based on the determination, a value is returned that should be used to allocate
117 interrupts with the \fBddi_int_alloc()\fR function.
118 .sp
119 .LP
120 The \fBddi_intr_get_supported_types\fR(9F) function returns a list of valid
121 supported types for the given hardware device. It must be called prior to
122 calling either the \fBddi_intr_get_nintrs()\fR or \fBddi_intr_get_navail()\fR.
123 .SH RETURN VALUES
124 .sp
125 .LP
126 The \fBddi_intr_get_nintrs()\fR and \fBddi_intr_get_navail()\fR functions
127 return:
128 .sp
129 .ne 2
130 .na
131 \fB\fBDDI_SUCCESS\fR\fR
132 .ad
133 .RS 21n
134 On success.
135 .RE
136
137 .sp
|
1 '\" te
2 .\" Copyright (c) 2006, 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_NINTRS 9F "Dec 13, 2013"
7 .SH NAME
8 ddi_intr_get_nintrs, ddi_intr_get_navail \- return number of interrupts
9 supported or available for a given interrupt type
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/types.h>
14 #include <sys/conf.h>
15 #include <sys/ddi.h>
16 #include <sys/sunddi.h>
17
18 \fBint\fR \fBddi_intr_get_nintrs\fR(\fBdev_info_t *\fR\fIdip\fR, \fBint\fR \fItype\fR, \fBint *\fR\fInintrsp\fR);
19 .fi
20
21 .LP
22 .nf
23 \fBint\fR \fBddi_intr_get_navail\fR(\fBdev_info_t *\fR\fIdip\fR, \fBint\fR \fItype\fR, \fBint *\fR\fInavailp\fR);
24 .fi
25
26 .SH INTERFACE LEVEL
97 the given \fItype\fR supported by a particular hardware device. On a successful
98 return, the number of supported interrupts is returned as an integer pointed to
99 by the \fInintrsp\fR argument.
100 .sp
101 .LP
102 If the hardware device is not found to support any interrupts of the given
103 \fItype\fR, the \fBDDI_INTR_NOTFOUND\fR failure is returned rather than a zero
104 in \fInintrsp\fR.
105 .sp
106 .LP
107 The \fBddi_intr_get_navail()\fR function returns the number of interrupts of a
108 given \fItype\fR that is available to a particular hardware device. On a
109 successful return, the number of available interrupts is returned as an integer
110 pointed to by \fInavailp\fR.
111 .sp
112 .LP
113 The hardware device may support more than one interrupt and can request that
114 all interrupts be allocated. The host software can then use policy-based
115 decisions to determine how many interrupts are made available to the device.
116 Based on the determination, a value is returned that should be used to allocate
117 interrupts with the \fBddi_intr_alloc()\fR function.
118 .sp
119 .LP
120 The \fBddi_intr_get_supported_types\fR(9F) function returns a list of valid
121 supported types for the given hardware device. It must be called prior to
122 calling either the \fBddi_intr_get_nintrs()\fR or \fBddi_intr_get_navail()\fR.
123 .SH RETURN VALUES
124 .sp
125 .LP
126 The \fBddi_intr_get_nintrs()\fR and \fBddi_intr_get_navail()\fR functions
127 return:
128 .sp
129 .ne 2
130 .na
131 \fB\fBDDI_SUCCESS\fR\fR
132 .ad
133 .RS 21n
134 On success.
135 .RE
136
137 .sp
|