kernel/source/devices/pc/apic/lapic.cpp
// note: this is in lapic.cpp because we ack the interrupts on the local apic.
this is in lapic.cpp because we ack the interrupts on the local apic.
this is in lapic . cpp because we ack the interrupts on the local apic .
void sendEOI(int num)
	{
		auto proc = scheduler::getCurrentCPU();
		assert(proc);
		auto vector = num + IRQ_BASE_VECTOR;
		auto isr = readISR(proc->localApicAddr, vector);
		if(isr & (1 << (vector % 32)))
		{
			writeLAPIC(proc->localApicAddr, REG_EOI, 0);
		}
	}
void sendEOI ( int num ) { auto proc = scheduler :: getCurrentCPU ( ) ; assert ( proc ) ; auto vector = num + IRQ_BASE_VECTOR ; auto isr = readISR ( proc -> localApicAddr , vector ) ; if ( isr & ( 1 << ( vector % 32 ) ) ) { writeLAPIC ( proc -> localApicAddr , REG_EOI , 0 ) ; } }
note: this is in lapic.cpp because we ack the interrupts on the local apic.
note : this is in lapic . cpp because we ack the interrupts on the local apic .
// get the current guy // check the ISR register for the interrupt: // note: we always take an IRQ number (ie IRQ0 is passed as '0'!) // send an eoi by writing 0 to the eoi register.