'\" te .\" Copyright (c) ,2006, Sun Microsystems, Inc. .\" 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_HILEVEL 9F "Jan 16, 2006" .SH NAME ddi_intr_hilevel \- indicate interrupt handler type .SH SYNOPSIS .nf #include #include \fBint\fR \fBddi_intr_hilevel\fR(\fBdev_info_t *\fR\fIdip\fR, \fBuint_t\fR \fIinumber\fR); .fi .SH INTERFACE LEVEL illumos DDI specific (illumos DDI). This interface is obsolete. Use the new interrupt interfaces referenced in \fBIntro\fR(9F). Refer to \fIWriting Device Drivers\fR for more information. .SH PARAMETERS .ne 2 .na \fB\fIdip\fR\fR .ad .RS 11n Pointer to \fBdev_info\fR structure. .RE .sp .ne 2 .na \fB\fIinumber\fR\fR .ad .RS 11n Interrupt number. .RE .SH DESCRIPTION The \fBddi_intr_hilevel()\fR function returns non-zero if the specified interrupt is a "high level" interrupt. .sp .LP High level interrupts must be handled without using system services that manipulate thread or process states, because these interrupts are not blocked by the scheduler. .sp .LP In addition, high level interrupt handlers must take care to do a minimum of work because they are not preemptable. .sp .LP A typical high level interrupt handler would put data into a circular buffer and schedule a soft interrupt by calling \fBddi_trigger_softintr()\fR. The circular buffer could be protected by using a mutex that was properly initialized for the interrupt handler. .sp .LP The \fBddi_intr_hilevel()\fR function can be used before calling \fBddi_add_intr()\fR to decide which type of interrupt handler should be used. Most device drivers are designed with the knowledge that the devices they support will always generate low level interrupts, however some devices, for example those using SBus or VME bus level 6 or 7 interrupts must use this test because on some machines those interrupts are high level (above the scheduler level) and on other machines they are not. .SH RETURN VALUES .ne 2 .na \fBnon-zero\fR .ad .RS 12n indicates a high-level interrupt. .RE .SH CONTEXT These functions can be called from useruser, interrupt, or kernel context. .SH ATTRIBUTES See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Obsolete .TE .SH SEE ALSO \fBddi_add_intr\fR(9F), \fBIntro\fR(9F), \fBmutex\fR(9F) .sp .LP \fIWriting Device Drivers\fR