x86_64: charge clock cycles to threads when handling IRQs
Clock cycles that are used to handle the IRQ itself are *not* charged to the thread.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <arch/ports.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <socks/printk.h>
|
||||
#include <socks/sched.h>
|
||||
#include <socks/libc/string.h>
|
||||
#include <socks/machine/irq.h>
|
||||
#include <socks/machine/cpu.h>
|
||||
@@ -232,11 +233,15 @@ void isr_dispatch(struct cpu_context *regs)
|
||||
|
||||
void irq_dispatch(struct cpu_context *regs)
|
||||
{
|
||||
end_charge_period();
|
||||
|
||||
irq_ack(regs->int_no);
|
||||
struct queue *hooks = &irq_hooks[regs->int_no - IRQ0];
|
||||
queue_foreach(struct irq_hook, hook, hooks, irq_entry) {
|
||||
hook->irq_callback();
|
||||
}
|
||||
|
||||
start_charge_period();
|
||||
}
|
||||
|
||||
void syscall_dispatch(struct cpu_context *regs)
|
||||
|
||||
Reference in New Issue
Block a user