'\" te .\" Copyright (c) ,2006, Sun Microsystems, Inc. .TH ddi_intr_hilevel 9F "16 Jan 2006" "SunOS 5.11" "Kernel Functions for Drivers" .SH NAME ddi_intr_hilevel \- indicate interrupt handler type .SH SYNOPSIS .LP .nf #include #include \fBint\fR \fBddi_intr_hilevel\fR(\fBdev_info_t *\fR\fIdip\fR, \fBuint_t\fR \fIinumber\fR); .fi .SH INTERFACE LEVEL .sp .LP Solaris DDI specific (Solaris 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 .sp .ne 2 .mk .na \fB\fIdip\fR\fR .ad .RS 11n .rt Pointer to \fBdev_info\fR structure. .RE .sp .ne 2 .mk .na \fB\fIinumber\fR\fR .ad .RS 11n .rt Interrupt number. .RE .SH DESCRIPTION .sp .LP 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 .sp .ne 2 .mk .na \fBnon-zero\fR .ad .RS 12n .rt indicates a high-level interrupt. .RE .SH CONTEXT .sp .LP These functions can be called from useruser, interrupt, or kernel context. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityObsolete .TE .SH SEE ALSO .sp .LP \fBddi_add_intr\fR(9F), \fBIntro\fR(9F), \fBmutex\fR(9F) .sp .LP \fIWriting Device Drivers\fR