Kernel: add NEVER_INLINE and make Interruptable not constructable

This commit is contained in:
Bananymous 2023-10-13 14:11:56 +03:00
parent 518fd3fad0
commit 63f64619bc
2 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,4 @@
#pragma once #pragma once
#define ALWAYS_INLINE inline __attribute__((always_inline)) #define ALWAYS_INLINE inline __attribute__((always_inline))
#define NEVER_INLINE __attribute__((noinline))

View File

@ -11,14 +11,16 @@ namespace Kernel
class Interruptable class Interruptable
{ {
public: public:
Interruptable() = default;
void set_irq(int irq); void set_irq(int irq);
void enable_interrupt(); void enable_interrupt();
void disable_interrupt(); void disable_interrupt();
virtual void handle_irq() = 0; virtual void handle_irq() = 0;
protected:
Interruptable() = default;
~Interruptable() {}
private: private:
int m_irq { -1 }; int m_irq { -1 };
}; };