1
Files
interrupt-handling-using-th…/code/interruptdispatcher_assign.cpp
2023-03-02 17:29:30 +01:00

10 lines
362 B
C++

// Excerpt from the "assign" function
void InterruptDispatcher::assign(InterruptVector vec, InterruptHandler &handler) {
if (handlers[vec] == nullptr) {
// Make space for multiple possible interrupt handlers
handlers[vec] = new Util::ArrayList<InterruptHandler *>;
}
handlers[vec]->add(&handler); // Register a handler to a vector
}