[kernel] Clean up interrupts.cpp

There was a lot of old kruft in interrupts.cpp - clean it up and make
irq_handler also use kassert for invalid states.
This commit is contained in:
Justin C. Miller
2021-08-01 17:30:39 -07:00
parent 4dc9675a6c
commit d36b2d8057
2 changed files with 7 additions and 28 deletions

View File

@@ -21,7 +21,9 @@ enum class isr : uint8_t
};
/// Helper operator to add an offset to an isr vector
isr operator+(const isr &lhs, int rhs);
constexpr isr operator+(const isr &lhs, int rhs) {
return static_cast<isr>(static_cast<uint8_t>(lhs) + rhs);
}
extern "C" {
/// Set the CPU interrupt enable flag (sti)