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_HILEVEL_PRI 9F "Apr 07, 2005"
8 ddi_intr_get_hilevel_pri \- get minimum priority level for a high-level
13 #include <sys/types.h>
16 #include <sys/sunddi.h>
18 \fBint\fR \fBddi_intr_get_hilevel_pri\fR(\fBvoid\fR);
24 Solaris DDI specific (Solaris DDI).
28 Upon a successful return, the \fBddi_intr_get_hilevel_pri()\fR function returns
29 the minimum priority level for a high-level interrupt. The return priority
30 value can be used to compare to other priority values, such as those returned
31 from \fBddi_intr_get_pri\fR(9F), to determine if a given interrupt priority is
32 a high-level interrupt.
35 High-level interrupts must be handled without using system services that
36 manipulate thread or process states, because such interrupts are not blocked by
40 In addition, high-level interrupt handlers must take care to do a minimum of
41 work because they cannot be preempted.
44 A typical high-level interrupt handler puts data into a circular buffer and
45 schedule a soft interrupt by calling \fBddi_intr_trigger_softint()\fR. The
46 circular buffer can be protected by using a mutex that is properly initialized
47 for the interrupt handler.
50 The \fBddi_intr_get_hilevel_pri()\fR function can be used before calling
51 \fBddi_intr_add_handler()\fR to help determine which type of interrupt handler
52 can be used. Most device drivers are designed with the knowledge that supported
53 devices always generate low level interrupts. On some machines, however,
54 interrupts are high-level above the scheduler level and on other machines they
55 are not. Devices such as those those using SBus interrupts or VME bus level 6
56 or 7 interrupts must use the \fBddi_intr_get_hilevel_pri()\fR function to test
57 the type of interrupt handler that can be used.
61 The \fBddi_intr_get_hilevel_pri()\fR function returns the priority value for a
66 The \fBddi_intr_get_hilevel_pri()\fR function can be called from either user or
67 kernel non-interrupt context.
71 See \fBattributes\fR(5) for descriptions of the following attributes:
79 ATTRIBUTE TYPE ATTRIBUTE VALUE
81 Interface Stability Committed
87 \fBattributes\fR(5), \fBddi_intr_add_handler\fR(9F), \fBddi_intr_alloc\fR(9F),
88 \fBddi_intr_enable\fR(9F), \fBddi_intr_get_pri\fR(9F),
89 \fBddi_intr_trigger_softint\fR(9F), \fBmutex\fR(9F)
92 \fIWriting Device Drivers\fR