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

Method SendIpi

src/arch/riscv64/interrupt.cpp:87–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87auto Interrupt::SendIpi(uint64_t target_cpu_mask) -> Expected<void> {
88 if (target_cpu_mask > (1UL << SIMPLEKERNEL_MAX_CORE_COUNT) - 1) {
89 return std::unexpected(Error(ErrorCode::kIpiTargetOutOfRange));
90 }
91
92 auto ret = sbi_send_ipi(target_cpu_mask, 0);
93 if (ret.error != SBI_SUCCESS) {
94 return std::unexpected(Error(ErrorCode::kIpiSendFailed));
95 }
96 return {};
97}
98
99auto Interrupt::BroadcastIpi() -> Expected<void> {
100 // 如果没有其他核心,直接返回成功

Callers

nothing calls this directly

Calls 1

ErrorClass · 0.85

Tested by

no test coverage detected