MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / clear_irq

Method clear_irq

crates/virtual-machine/src/devices/plic.rs:44–50  ·  view source on GitHub ↗
(&mut self, source: u32)

Source from the content-addressed store, hash-verified

42 }
43 }
44
45 fn clear_irq(&mut self, source: u32) {
46 if source > 0 && source <= MAX_SOURCES as u32 {
47 let idx = (source as usize - 1) / 32;
48 let bit = (source - 1) % 32;
49 self.pending[idx] &= !(1 << bit);
50 }
51 }
52
53 pub fn next_irq(&self, hart: usize) -> Option<u32> {

Callers 1

read_wordMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected