mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 07:19:20 +00:00
Optimize memory usage
This commit is contained in:
@ -53,12 +53,18 @@ namespace Driver
|
||||
void *InterruptCallback = nullptr;
|
||||
Memory::MemMgr *MemTrk = nullptr;
|
||||
DriverInterruptHook *InterruptHook[16]{};
|
||||
|
||||
bool operator==(const DriverFile &Other) const
|
||||
{
|
||||
return DriverUID == Other.DriverUID;
|
||||
}
|
||||
};
|
||||
|
||||
class DriverInterruptHook : public Interrupts::Handler
|
||||
{
|
||||
private:
|
||||
DriverFile Handle;
|
||||
bool Enabled = true;
|
||||
|
||||
#if defined(a64)
|
||||
void OnInterruptReceived(CPU::x64::TrapFrame *Frame);
|
||||
@ -69,6 +75,9 @@ namespace Driver
|
||||
#endif
|
||||
|
||||
public:
|
||||
void Enable() { Enabled = true; }
|
||||
void Disable() { Enabled = false; }
|
||||
bool IsEnabled() { return Enabled; }
|
||||
DriverInterruptHook(int Interrupt, DriverFile Handle);
|
||||
virtual ~DriverInterruptHook() = default;
|
||||
};
|
||||
|
@ -41,9 +41,6 @@ namespace NetworkInterfaceManager
|
||||
/** @brief Device interface IP address (Big-endian) */
|
||||
InternetProtocol IP;
|
||||
|
||||
/** @brief Reserved */
|
||||
void *DriverCallBackAddress;
|
||||
|
||||
/** @brief Reserved */
|
||||
unsigned long DriverID;
|
||||
};
|
||||
|
Reference in New Issue
Block a user