Loading...
--- xnu/xnu-12377.101.15/iokit/Kernel/IOInterruptEventSource.cpp
+++ xnu/xnu-8019.80.24/iokit/Kernel/IOInterruptEventSource.cpp
@@ -84,10 +84,6 @@
{
bool res = true;
- if (inIntIndex < 0) {
- return false;
- }
-
if (!super::init(inOwner, (IOEventSourceAction) inAction)) {
return false;
}
@@ -413,18 +409,18 @@
}
if (reserved->statistics) {
+ if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelCountIndex)) {
+ IA_ADD_VALUE(&reserved->statistics->interruptStatistics[kInterruptAccountingSecondLevelCountIndex], 1);
+ }
+
+ if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelCPUTimeIndex)) {
+ endCPUTime = thread_get_runtime_self();
+ IA_ADD_VALUE(&reserved->statistics->interruptStatistics[kInterruptAccountingSecondLevelCPUTimeIndex], endCPUTime - startCPUTime);
+ }
+
if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelSystemTimeIndex)) {
endSystemTime = mach_absolute_time();
IA_ADD_VALUE(&reserved->statistics->interruptStatistics[kInterruptAccountingSecondLevelSystemTimeIndex], endSystemTime - startSystemTime);
- }
-
- if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelCPUTimeIndex)) {
- endCPUTime = thread_get_runtime_self();
- IA_ADD_VALUE(&reserved->statistics->interruptStatistics[kInterruptAccountingSecondLevelCPUTimeIndex], endCPUTime - startCPUTime);
- }
-
- if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelCountIndex)) {
- IA_ADD_VALUE(&reserved->statistics->interruptStatistics[kInterruptAccountingSecondLevelCountIndex], 1);
}
}