(context_addr: usize)
| 80 | pub const INTERRUPT_CONTEXT_SIZE: usize = 20 * 8; |
| 81 | |
| 82 | extern "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 | /// |
nothing calls this directly
no test coverage detected