/* Write a 32 bit IO APIC register. 
This routine writes the specified IO APIC register using indirect addressing. */
static __pinned_func void __IoApicSet(int32_t offset, uint32_t value)
/* Write a 32 bit IO APIC register. 
This routine writes the specified IO APIC register using indirect addressing. */
static __pinned_func void __IoApicSet(int32_t offset, uint32_t value)
{
	unsigned int key;
	key = irq_lock();
	*(volatile uint32_t *)(IOAPIC_REG + IOAPIC_IND) = (unsigned char)offset;
	*((volatile uint32_t *)(IOAPIC_REG + IOAPIC_DATA)) = value;
	irq_unlock(key);
}