MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / keyboard_interrupt_handler

Function keyboard_interrupt_handler

src/interrupts.rs:78–94  ·  view source on GitHub ↗
(_stackframe: InterruptStackFrame)

Source from the content-addressed store, hash-verified

76}
77
78extern "x86-interrupt" fn keyboard_interrupt_handler(_stackframe: InterruptStackFrame) {
79 use x86_64::instructions::port::Port;
80
81 let mut port = Port::new(0x60);
82 let scancode: u8 = unsafe
83 {
84 port.read()
85 };
86
87 crate::task::kbd::add_scancode(scancode);
88
89 unsafe
90 {
91 PICS.lock()
92 .notify_intrend(IntrIdx::Keyboard.asu8());
93 }
94}
95
96use x86_64::structures::idt::PageFaultErrorCode;
97use crate::hltloop;

Callers

nothing calls this directly

Calls 5

add_scancodeFunction · 0.85
lockMethod · 0.80
asu8Method · 0.80
readMethod · 0.45
notify_intrendMethod · 0.45

Tested by

no test coverage detected