diff options
Diffstat (limited to 'extras/mini-os/arch/x86/time.c')
-rw-r--r-- | extras/mini-os/arch/x86/time.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/extras/mini-os/arch/x86/time.c b/extras/mini-os/arch/x86/time.c index d7b387f95f..4af0b89b94 100644 --- a/extras/mini-os/arch/x86/time.c +++ b/extras/mini-os/arch/x86/time.c @@ -222,10 +222,17 @@ static void timer_handler(evtchn_port_t ev, struct pt_regs *regs, void *ign) +static evtchn_port_t port; void init_time(void) { - evtchn_port_t port; printk("Initialising timer interface\n"); port = bind_virq(VIRQ_TIMER, &timer_handler, NULL); unmask_evtchn(port); } + +void fini_time(void) +{ + /* Clear any pending timer */ + HYPERVISOR_set_timer_op(0); + unbind_evtchn(port); +} |