Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

intsupc.c File Reference

#include "ki.h"

Go to the source code of this file.

Functions

VOID KiLowerIrqlSpecial (KIRQL)
VOID KiDispatchSoftwareInterrupt (KIRQL Irql)
VOID KiCheckForSoftwareInterrupt (KIRQL RequestIrql)
VOID KiRequestSoftwareInterrupt (KIRQL RequestIrql)


Function Documentation

VOID KiCheckForSoftwareInterrupt (  KIRQL  RequestIrql  ) 
 

Definition at line 98 of file intsupc.c.

References APC_LEVEL, DISPATCH_LEVEL, KiDisableInterrupts(), KiDispatchSoftwareInterrupt(), and KiRestoreInterrupts().

00104 : 00105 00106 Check for and dispatch pending software interrupts 00107 00108 Arguments: 00109 00110 Irql (a0) - New, lower IRQL 00111 00112 Return Value: 00113 00114 None. 00115 00116 Notes: 00117 00118 Caller must check IRQL has dropped below s/w IRQL level 00119 00120 --*/ 00121 00122 { 00123 BOOLEAN InterruptState; 00124 00125 InterruptState = KiDisableInterrupts(); 00126 00127 if (RequestIrql == APC_LEVEL) { 00128 00129 // 00130 // Dispatch only DPC requests 00131 // 00132 00133 while (PCR->DispatchInterrupt) { 00134 KiDispatchSoftwareInterrupt(DISPATCH_LEVEL); 00135 } 00136 00137 } else { 00138 00139 // 00140 // Dispatch either APC or DPC 00141 // 00142 00143 while (PCR->SoftwareInterruptPending) { 00144 KIRQL Irql; 00145 00146 if (PCR->DispatchInterrupt) { 00147 Irql = DISPATCH_LEVEL; 00148 } else if (PCR->ApcInterrupt) { 00149 Irql = APC_LEVEL; 00150 } 00151 KiDispatchSoftwareInterrupt(Irql); 00152 } 00153 } 00154 00155 KiRestoreInterrupts(InterruptState); 00156 }

VOID KiDispatchSoftwareInterrupt (  KIRQL  Irql  ) 
 

Definition at line 32 of file intsupc.c.

References APC_LEVEL, KeGetCurrentPrcb, KernelMode, KiDeliverApc(), KiDispatchInterrupt(), KiLowerIrqlSpecial(), and NULL.

Referenced by KiCheckForSoftwareInterrupt().

00038 : 00039 00040 Dispatch pending software interrupt 00041 00042 Arguments: 00043 00044 Irql (a0) - Software interrupt to dispatch 00045 00046 Return Value: 00047 00048 None. 00049 00050 Notes: 00051 00052 Interrupts disabled on entry/return. 00053 The function is only called by KiCheckForSoftwareInterrupt that passes an 00054 Irql value of APC_LEVEL or DISPATCH_LEVEL. 00055 00056 00057 --*/ 00058 00059 { 00060 PKPRCB Prcb = KeGetCurrentPrcb(); 00061 00062 KiLowerIrqlSpecial(Irql); // set IRQL 00063 00064 if (Irql == APC_LEVEL) { 00065 00066 Prcb->ApcBypassCount += 1; 00067 PCR->ApcInterrupt = 0; 00068 00069 _enable(); 00070 00071 // 00072 // Dispatch APC Interrupt via direct call to KiDeliverApc 00073 // 00074 00075 KiDeliverApc(KernelMode,NULL,NULL); 00076 00077 _disable(); 00078 00079 } else { 00080 00081 Prcb->DpcBypassCount += 1; 00082 PCR->DispatchInterrupt = 0; 00083 00084 _enable(); 00085 00086 // 00087 // Dispatch DPC Interrupt 00088 // 00089 00090 KiDispatchInterrupt(); 00091 00092 _disable(); 00093 00094 } 00095 }

VOID KiLowerIrqlSpecial (  KIRQL   ) 
 

Referenced by KiDispatchSoftwareInterrupt().

VOID KiRequestSoftwareInterrupt (  KIRQL  RequestIrql  ) 
 

Definition at line 159 of file intsupc.c.

References APC_LEVEL, DISPATCH_LEVEL, and KeBugCheckEx().

Referenced by KeDetachProcess(), KeInsertQueueDpc(), KeReleaseMutant(), KeUnstackDetachProcess(), KeUpdateRunTime(), KiChkTimerExpireSysDpc(), and KiIpiProcessRequests().

00165 : 00166 00167 This function requests a software interrupt at the specified IRQL 00168 level. 00169 00170 Arguments: 00171 00172 RequestIrql (a0) - Supplies the request IRQL value. 00173 00174 Return Value: 00175 00176 None. 00177 00178 --*/ 00179 00180 { 00181 #if DEBUG 00182 if ((RequestIrql < APC_LEVEL) || (RequestIrql > DISPATCH_LEVEL)) 00183 KeBugCheckEx(INVALID_SOFTWARE_INTERRUPT, RequestIrql, 0, 0, 0); 00184 #endif 00185 ((PUCHAR)&PCR->SoftwareInterruptPending)[RequestIrql-APC_LEVEL] = 1; 00186 } }


Generated on Sat May 15 19:44:15 2004 for test by doxygen 1.3.7