IntDispatcher: Use default initialization instead of loop
This commit is contained in:
@ -15,10 +15,11 @@
|
|||||||
#include "kernel/system/Globals.h"
|
#include "kernel/system/Globals.h"
|
||||||
#include "kernel/exception/Bluescreen.h"
|
#include "kernel/exception/Bluescreen.h"
|
||||||
#include "lib/util/System.h"
|
#include "lib/util/System.h"
|
||||||
#include "kernel/system/System.h"
|
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
|
|
||||||
|
NamedLogger IntDispatcher::log = NamedLogger("IntDispatcher");
|
||||||
|
|
||||||
int IntDispatcher::assign(uint8_t vector, ISR &isr) {
|
int IntDispatcher::assign(uint8_t vector, ISR &isr) {
|
||||||
|
|
||||||
/* hier muss Code eingefuegt werden */
|
/* hier muss Code eingefuegt werden */
|
||||||
|
@ -29,19 +29,9 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
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(const IntDispatcher ©) = delete; // Verhindere Kopieren
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Registrierung einer ISR. (Rueckgabewert: 0 = Erfolg, -1 = Fehler)
|
// Registrierung einer ISR. (Rueckgabewert: 0 = Erfolg, -1 = Fehler)
|
||||||
int assign(uint8_t vector, ISR &isr);
|
int assign(uint8_t vector, ISR &isr);
|
||||||
@ -50,10 +40,9 @@ public:
|
|||||||
int dispatch(uint8_t vector);
|
int dispatch(uint8_t vector);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// TODO: Initialize to nullptr like this: handlerMap = {nullptr};
|
Container::Array<ISR *, 256> handlerMap = {nullptr};
|
||||||
Container::Array<ISR *, 256> handlerMap;
|
|
||||||
|
|
||||||
NamedLogger log;
|
static NamedLogger log;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user