MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / Interrupt

Method Interrupt

src/arch/riscv64/interrupt.cpp:36–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34} // namespace
35
36Interrupt::Interrupt() {
37 // 注册默认中断处理函数
38 for (auto& i : interrupt_handlers_) {
39 i = InterruptDelegate::create<DefaultInterruptHandler>();
40 }
41 // 注册默认异常处理函数
42 for (auto& i : exception_handlers_) {
43 i = InterruptDelegate::create<DefaultExceptionHandler>();
44 }
45 klog::Info("Interrupt init.");
46}
47
48auto Interrupt::Do(uint64_t cause, cpu_io::TrapContext* context) -> void {
49 auto interrupt = cpu_io::Scause::Interrupt::Get(cause);

Callers

nothing calls this directly

Calls 1

InfoFunction · 0.85

Tested by

no test coverage detected