* The io_handler::handled_count was increased unconditionally, but in some cases
not at all. * Tried to improve the readability of the "ints" command output. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34613 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ccc02f719a
commit
2388f50c53
@ -88,13 +88,21 @@ dump_int_statistics(int argc, char **argv)
|
|||||||
if (error == B_OK && exactMatch) {
|
if (error == B_OK && exactMatch) {
|
||||||
if (strchr(imageName, '/') != NULL)
|
if (strchr(imageName, '/') != NULL)
|
||||||
imageName = strrchr(imageName, '/') + 1;
|
imageName = strrchr(imageName, '/') + 1;
|
||||||
|
|
||||||
kprintf("\t%s:%s (%p), data %p, handled %8lld%s\n", imageName,
|
int length = 4 + strlen(imageName);
|
||||||
symbol, io->func, io->data, io->handled_count,
|
kprintf(" %s:%-*s (%p)", imageName, 45 - length, symbol,
|
||||||
io->no_handled_info ? ", NO HANDLED INFO" : "");
|
io->func);
|
||||||
} else
|
} else
|
||||||
kprintf("\t%p, data %p\n", io->func, io->data);
|
kprintf("\t\t\t\t\t func %p", io->func);
|
||||||
|
|
||||||
|
kprintf(", data %p, handled ", io->data);
|
||||||
|
if (io->no_handled_info)
|
||||||
|
kprintf("<unknown>\n");
|
||||||
|
else
|
||||||
|
kprintf("%8lld\n", io->handled_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kprintf("\n");
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -180,18 +188,21 @@ int_io_interrupt_handler(int vector, bool levelTriggered)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* For level-triggered interrupts, we actually handle the return
|
// For level-triggered interrupts, we actually handle the return
|
||||||
* value (ie. B_HANDLED_INTERRUPT) to decide wether or not we
|
// value (ie. B_HANDLED_INTERRUPT) to decide wether or not we
|
||||||
* want to call another interrupt handler.
|
// want to call another interrupt handler.
|
||||||
* For edge-triggered interrupts, however, we always need to call
|
// For edge-triggered interrupts, however, we always need to call
|
||||||
* all handlers, as multiple interrupts cannot be identified. We
|
// all handlers, as multiple interrupts cannot be identified. We
|
||||||
* still make sure the return code of this function will issue
|
// still make sure the return code of this function will issue
|
||||||
* whatever the driver thought would be useful (ie. B_INVOKE_SCHEDULER)
|
// whatever the driver thought would be useful (ie. B_INVOKE_SCHEDULER)
|
||||||
*/
|
|
||||||
|
|
||||||
for (io = sVectors[vector].handler_list; io != NULL; io = io->next) {
|
for (io = sVectors[vector].handler_list; io != NULL; io = io->next) {
|
||||||
status = io->func(io->data);
|
status = io->func(io->data);
|
||||||
|
|
||||||
|
#if DEBUG_INTERRUPTS
|
||||||
|
if (status != B_UNHANDLED_INTERRUPT)
|
||||||
|
io->handled_count++;
|
||||||
|
#endif
|
||||||
if (levelTriggered && status != B_UNHANDLED_INTERRUPT)
|
if (levelTriggered && status != B_UNHANDLED_INTERRUPT)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -199,9 +210,6 @@ int_io_interrupt_handler(int vector, bool levelTriggered)
|
|||||||
handled = true;
|
handled = true;
|
||||||
else if (status == B_INVOKE_SCHEDULER)
|
else if (status == B_INVOKE_SCHEDULER)
|
||||||
invokeScheduler = true;
|
invokeScheduler = true;
|
||||||
#if DEBUG_INTERRUPTS
|
|
||||||
io->handled_count++;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_INTERRUPTS
|
#if DEBUG_INTERRUPTS
|
||||||
|
Loading…
Reference in New Issue
Block a user