Add method to post an interrupt in software

This commit is contained in:
Eryn Wells 2016-03-13 15:47:50 -04:00
parent cf8047f7be
commit 1f6ce53e08
2 changed files with 10 additions and 0 deletions

View file

@ -79,6 +79,14 @@ InterruptHandler::disableInterrupts()
asm("cli"); asm("cli");
} }
void
InterruptHandler::postInterrupt(uint8_t interrupt)
const
{
asm("int %0": : "a"(interrupt));
}
} /* namespace x86 */ } /* namespace x86 */

View file

@ -55,6 +55,8 @@ struct InterruptHandler
void enableInterrupts() const; void enableInterrupts() const;
void disableInterrupts() const; void disableInterrupts() const;
void postInterrupt(uint8_t interrupt);
private: private:
PIC mPIC; PIC mPIC;
IDT mIDT; IDT mIDT;