IntDispatcher: Use default initialization instead of loop
This commit is contained in:
@ -15,10 +15,11 @@
|
||||
#include "kernel/system/Globals.h"
|
||||
#include "kernel/exception/Bluescreen.h"
|
||||
#include "lib/util/System.h"
|
||||
#include "kernel/system/System.h"
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
NamedLogger IntDispatcher::log = NamedLogger("IntDispatcher");
|
||||
|
||||
int IntDispatcher::assign(uint8_t vector, ISR &isr) {
|
||||
|
||||
/* hier muss Code eingefuegt werden */
|
||||
|
@ -29,19 +29,9 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
IntDispatcher(const IntDispatcher ©) = delete; // Verhindere Kopieren
|
||||
IntDispatcher() = default;
|
||||
|
||||
// TODO: Somehow the logs don't appear, is this not executed, does the Array::iterator not work?
|
||||
IntDispatcher() : log("IntDis") {
|
||||
for (ISR *&slot: handlerMap) { // TODO: What the fuck is *&
|
||||
if (slot == nullptr) {
|
||||
log.debug() << "SLOT IS NULLPTR" << endl;
|
||||
} else {
|
||||
log.debug() << "SLOT IS NOT NULLPTR" << endl;
|
||||
slot = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
IntDispatcher(const IntDispatcher ©) = delete; // Verhindere Kopieren
|
||||
|
||||
// Registrierung einer ISR. (Rueckgabewert: 0 = Erfolg, -1 = Fehler)
|
||||
int assign(uint8_t vector, ISR &isr);
|
||||
@ -50,10 +40,9 @@ public:
|
||||
int dispatch(uint8_t vector);
|
||||
|
||||
private:
|
||||
// TODO: Initialize to nullptr like this: handlerMap = {nullptr};
|
||||
Container::Array<ISR *, 256> handlerMap;
|
||||
Container::Array<ISR *, 256> handlerMap = {nullptr};
|
||||
|
||||
NamedLogger log;
|
||||
static NamedLogger log;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user