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

Method SetPendingBit

src/arch/riscv64/plic/plic.cpp:131–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131auto Plic::SetPendingBit(uint32_t source_id, bool value) const -> void {
132 uint32_t word_index = source_id / 32;
133 uint32_t bit_index = source_id % 32;
134 uint32_t* word_addr = reinterpret_cast<uint32_t*>(
135 base_addr_ + kPendingBitsOffset + (word_index * 4));
136 if (value) {
137 *word_addr |= (1U << bit_index);
138 } else {
139 *word_addr &= ~(1U << bit_index);
140 }
141}
142
143auto Plic::PriorityThreshold(uint32_t context_id) const -> uint32_t& {
144 return *reinterpret_cast<uint32_t*>(base_addr_ + kContextOffset +

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected