MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / timer_handler

Function timer_handler

kernel/src/interrupts.rs:82–95  ·  view source on GitHub ↗
(context_addr: usize)

Source from the content-addressed store, hash-verified

80pub const INTERRUPT_CONTEXT_SIZE: usize = 20 * 8;
81
82extern "C" fn timer_handler(context_addr: usize) -> usize {
83 time::pit_interrupt_notify(); // For keeping track of time
84
85 // Process scheduler decides which process to schedule
86 // Returns the stack pointer to switch to.
87 let next_stack = process::schedule_next(context_addr);
88
89 // Tell the PIC that the interrupt has been processed
90 unsafe {
91 PICS.lock()
92 .notify_end_of_interrupt(InterruptIndex::Timer.as_u8());
93 }
94 next_stack
95}
96
97/// Interrupt handler wrapper which captures a Context
98///

Callers

nothing calls this directly

Calls 3

pit_interrupt_notifyFunction · 0.85
schedule_nextFunction · 0.85
as_u8Method · 0.80

Tested by

no test coverage detected