Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / ddi_intr_hilevel.9f
blob35e1fa772c3c44050b9dc18594d4432ce3d98422
1 '\" te
2 .\" Copyright (c) ,2006, Sun Microsystems, Inc.
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_HILEVEL 9F "Jan 16, 2006"
7 .SH NAME
8 ddi_intr_hilevel \- indicate interrupt handler type
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/ddi.h>
13 #include <sys/sunddi.h>
17 \fBint\fR \fBddi_intr_hilevel\fR(\fBdev_info_t *\fR\fIdip\fR, \fBuint_t\fR \fIinumber\fR);
18 .fi
20 .SH INTERFACE LEVEL
21 .sp
22 .LP
23 Solaris DDI specific (Solaris DDI). This interface is obsolete. Use the new
24 interrupt interfaces referenced in \fBIntro\fR(9F). Refer to \fIWriting Device
25 Drivers\fR for more information.
26 .SH PARAMETERS
27 .sp
28 .ne 2
29 .na
30 \fB\fIdip\fR\fR
31 .ad
32 .RS 11n
33 Pointer to \fBdev_info\fR structure.
34 .RE
36 .sp
37 .ne 2
38 .na
39 \fB\fIinumber\fR\fR
40 .ad
41 .RS 11n
42 Interrupt number.
43 .RE
45 .SH DESCRIPTION
46 .sp
47 .LP
48 The \fBddi_intr_hilevel()\fR function returns non-zero if the specified
49 interrupt is a "high level" interrupt.
50 .sp
51 .LP
52 High level interrupts must be handled without using system services that
53 manipulate thread or process states, because these interrupts are not blocked
54 by the scheduler.
55 .sp
56 .LP
57 In addition, high level interrupt handlers must take care to do a minimum of
58 work because they are not preemptable.
59 .sp
60 .LP
61 A typical high level interrupt handler would put data into a circular buffer
62 and schedule a soft interrupt by calling \fBddi_trigger_softintr()\fR. The
63 circular buffer could be protected by using a mutex that was properly
64 initialized for the interrupt handler.
65 .sp
66 .LP
67 The \fBddi_intr_hilevel()\fR function can be used before calling
68 \fBddi_add_intr()\fR to decide which type of interrupt handler should be used.
69 Most device drivers are designed with the knowledge that the devices they
70 support will always generate low level interrupts, however some devices, for
71 example those using SBus or VME bus level 6 or 7 interrupts must use this test
72 because on some machines those interrupts are high level (above the scheduler
73 level) and on other machines they are not.
74 .SH RETURN VALUES
75 .sp
76 .ne 2
77 .na
78 \fBnon-zero\fR
79 .ad
80 .RS 12n
81 indicates a high-level interrupt.
82 .RE
84 .SH CONTEXT
85 .sp
86 .LP
87 These functions can be called from useruser, interrupt, or kernel context.
88 .SH ATTRIBUTES
89 .sp
90 .LP
91 See \fBattributes\fR(5) for descriptions of the following attributes:
92 .sp
94 .sp
95 .TS
96 box;
97 c | c
98 l | l .
99 ATTRIBUTE TYPE  ATTRIBUTE VALUE
101 Interface Stability     Obsolete
104 .SH SEE ALSO
107 \fBddi_add_intr\fR(9F), \fBIntro\fR(9F), \fBmutex\fR(9F)
110 \fIWriting Device Drivers\fR