MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / decode_irq_from_selector

Function decode_irq_from_selector

devices/src/ioapic.rs:122–127  ·  view source on GitHub ↗

Given an offset that was read from/written to, return a tuple of the relevant IRQ and whether the offset refers to the high bits of that register.

(selector: u8)

Source from the content-addressed store, hash-verified

120/// Given an offset that was read from/written to, return a tuple of the relevant IRQ and whether
121/// the offset refers to the high bits of that register.
122fn decode_irq_from_selector(selector: u8) -> (usize, bool) {
123 (
124 ((selector - IOWIN_OFF) / IOWIN_SCALE) as usize,
125 selector & 1 != 0,
126 )
127}
128
129pub struct Ioapic {
130 id: String,

Callers 2

ioapic_writeMethod · 0.85
ioapic_readMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected