add int code to KePanic
This commit is contained in:
1 parent
6bff37746d
commit
b17c9ac854
10 files changed
+112
-99
No files matched your search
@@ -26,11 +26,11 @@ __declspec(dllexport) KIRQL KeRaiseIrql(KIRQL newIrql) {
|
||||
KIRQL oldIrql = cpu->CurrentIrql;
|
||||
|
||||
if (newIrql > HIGH_LEVEL) {
|
||||
KePanic("KeRaiseIrql: invalid target IRQL %u\n", (unsigned)newIrql);
|
||||
KePanic(KE_PANIC_CODE_IRQL, "KeRaiseIrql: invalid target IRQL %u\n", (unsigned)newIrql);
|
||||
}
|
||||
|
||||
if (newIrql < oldIrql) {
|
||||
KePanic("KeRaiseIrql: attempted raise from %s(%u) down to %s(%u)\n",
|
||||
KePanic(KE_PANIC_CODE_IRQL, "KeRaiseIrql: attempted raise from %s(%u) down to %s(%u)\n",
|
||||
KeIrqlName(oldIrql), (unsigned)oldIrql,
|
||||
KeIrqlName(newIrql), (unsigned)newIrql);
|
||||
}
|
||||
@@ -44,11 +44,11 @@ __declspec(dllexport) void KeLowerIrql(KIRQL oldIrql) {
|
||||
KIRQL currentIrql = cpu->CurrentIrql;
|
||||
|
||||
if (oldIrql > HIGH_LEVEL) {
|
||||
KePanic("KeLowerIrql: invalid target IRQL %u\n", (unsigned)oldIrql);
|
||||
KePanic(KE_PANIC_CODE_IRQL, "KeLowerIrql: invalid target IRQL %u\n", (unsigned)oldIrql);
|
||||
}
|
||||
|
||||
if (oldIrql > currentIrql) {
|
||||
KePanic("KeLowerIrql: attempted lower from %s(%u) up to %s(%u)\n",
|
||||
KePanic(KE_PANIC_CODE_IRQL, "KeLowerIrql: attempted lower from %s(%u) up to %s(%u)\n",
|
||||
KeIrqlName(currentIrql), (unsigned)currentIrql,
|
||||
KeIrqlName(oldIrql), (unsigned)oldIrql);
|
||||
}
|
||||
@@ -62,7 +62,7 @@ __declspec(dllexport) void KeLowerIrql(KIRQL oldIrql) {
|
||||
__declspec(dllexport) void KeAssertIrql(KIRQL expected) {
|
||||
KIRQL currentIrql = KeGetCurrentIrql();
|
||||
if (currentIrql != expected) {
|
||||
KePanic("IRQL assertion failed: expected %s(%u), current %s(%u)\n",
|
||||
KePanic(KE_PANIC_CODE_IRQL, "IRQL assertion failed: expected %s(%u), current %s(%u)\n",
|
||||
KeIrqlName(expected), (unsigned)expected,
|
||||
KeIrqlName(currentIrql), (unsigned)currentIrql);
|
||||
}
|
||||
@@ -71,7 +71,7 @@ __declspec(dllexport) void KeAssertIrql(KIRQL expected) {
|
||||
__declspec(dllexport) void KeAssertIrqlAtOrBelow(KIRQL maxIrql) {
|
||||
KIRQL currentIrql = KeGetCurrentIrql();
|
||||
if (currentIrql > maxIrql) {
|
||||
KePanic("IRQL assertion failed: expected <= %s(%u), current %s(%u)\n",
|
||||
KePanic(KE_PANIC_CODE_IRQL, "IRQL assertion failed: expected <= %s(%u), current %s(%u)\n",
|
||||
KeIrqlName(maxIrql), (unsigned)maxIrql,
|
||||
KeIrqlName(currentIrql), (unsigned)currentIrql);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user