'\" te .\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved. .TH ddi_intr_get_hilevel_pri 9F "07 Apr 2005" "SunOS 5.11" "Kernel Functions for Drivers" .SH NAME ddi_intr_get_hilevel_pri \- get minimum priority level for a high-level interrupt .SH SYNOPSIS .LP .nf #include #include #include #include \fBint\fR \fBddi_intr_get_hilevel_pri\fR(\fBvoid\fR); .fi .SH INTERFACE LEVEL .sp .LP Solaris DDI specific (Solaris DDI). .SH DESCRIPTION .sp .LP Upon a successful return, the \fBddi_intr_get_hilevel_pri()\fR function returns the minimum priority level for a high-level interrupt. The return priority value can be used to compare to other priority values, such as those returned from \fBddi_intr_get_pri\fR(9F), to determine if a given interrupt priority is a high-level interrupt. .sp .LP High-level interrupts must be handled without using system services that manipulate thread or process states, because such 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 cannot be preempted. .sp .LP A typical high-level interrupt handler puts data into a circular buffer and schedule a soft interrupt by calling \fBddi_intr_trigger_softint()\fR. The circular buffer can be protected by using a mutex that is properly initialized for the interrupt handler. .sp .LP The \fBddi_intr_get_hilevel_pri()\fR function can be used before calling \fBddi_intr_add_handler()\fR to help determine which type of interrupt handler can be used. Most device drivers are designed with the knowledge that supported devices always generate low level interrupts. On some machines, however, interrupts are high-level above the scheduler level and on other machines they are not. Devices such as those those using SBus interrupts or VME bus level 6 or 7 interrupts must use the \fBddi_intr_get_hilevel_pri()\fR function to test the type of interrupt handler that can be used. .SH RETURN VALUES .sp .LP The \fBddi_intr_get_hilevel_pri()\fR function returns the priority value for a high-level interrupt. .SH CONTEXT .sp .LP The \fBddi_intr_get_hilevel_pri()\fR function can be called from either user or kernel non-interrupt 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 StabilityCommitted .TE .SH SEE ALSO .sp .LP \fBattributes\fR(5), \fBddi_intr_add_handler\fR(9F), \fBddi_intr_alloc\fR(9F), \fBddi_intr_enable\fR(9F), \fBddi_intr_get_pri\fR(9F), \fBddi_intr_trigger_softint\fR(9F), \fBmutex\fR(9F) .sp .LP \fIWriting Device Drivers for Oracle Solaris 11.2\fR