MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / Handler

Function Handler

Kernel/src/arch/x86_64/keyboard.cpp:62–79  ·  view source on GitHub ↗

Interrupt handler

Source from the content-addressed store, hash-verified

60
61 // Interrupt handler
62 void Handler(void*, regs64_t* r)
63 {
64 // Read from the keyboard's data buffer
65 uint8_t key = inportb(0x60);
66
67 if(keyCount >= KEY_QUEUE_SIZE) return; // Drop key
68
69 // Add key to queue
70 keyQueue[keyQueueEnd] = key;
71
72 keyQueueEnd++;
73
74 if(keyQueueEnd >= KEY_QUEUE_SIZE) {
75 keyQueueEnd = 0;
76 }
77
78 keyCount++;
79 }
80
81 // Register interrupt handler
82 void Install() {

Callers

nothing calls this directly

Calls 1

inportbFunction · 0.85

Tested by

no test coverage detected