Make classes uppercase
This commit is contained in:
@ -10,7 +10,7 @@ void KeyEventManager::subscribe(KeyEventListener &sub) {
|
||||
|
||||
void KeyEventManager::unsubscribe(KeyEventListener &unsub) {
|
||||
log.debug() << "Unsubscribe, Thread ID: " << dec << unsub.tid << endl;
|
||||
for (Container::vector<KeyEventListener *>::iterator it = listeners.begin(); it != listeners.end(); ++it) {
|
||||
for (Container::Vector<KeyEventListener *>::iterator it = listeners.begin(); it != listeners.end(); ++it) {
|
||||
if ((*it)->tid == unsub.tid) {
|
||||
listeners.erase(it);
|
||||
return;
|
||||
|
||||
@ -14,7 +14,7 @@ class KeyEventManager {
|
||||
private:
|
||||
NamedLogger log;
|
||||
|
||||
Container::vector<KeyEventListener *> listeners;
|
||||
Container::Vector<KeyEventListener *> listeners;
|
||||
|
||||
public:
|
||||
KeyEventManager(const KeyEventManager ©) = delete;
|
||||
|
||||
@ -26,7 +26,7 @@ private:
|
||||
enum {
|
||||
size = 256
|
||||
};
|
||||
Container::array<ISR *, size> map;
|
||||
Container::Array<ISR *, size> map;
|
||||
|
||||
public:
|
||||
IntDispatcher(const IntDispatcher ©) = delete; // Verhindere Kopieren
|
||||
|
||||
@ -37,7 +37,7 @@ constexpr const bool INSANE_TRACE = false;
|
||||
* Parameter: *
|
||||
* next Thread der die CPU::erhalten soll. *
|
||||
*****************************************************************************/
|
||||
void Scheduler::start(Container::vector<Memory::unique_ptr<Thread>>::iterator next) {
|
||||
void Scheduler::start(Container::Vector<Memory::unique_ptr<Thread>>::iterator next) {
|
||||
active = next;
|
||||
if (active >= ready_queue.end()) {
|
||||
active = ready_queue.begin();
|
||||
@ -49,7 +49,7 @@ void Scheduler::start(Container::vector<Memory::unique_ptr<Thread>>::iterator ne
|
||||
(*active)->start(); // First dereference the Iterator, then the unique_ptr to get Thread
|
||||
}
|
||||
|
||||
void Scheduler::switch_to(Thread *prev_raw, Container::vector<Memory::unique_ptr<Thread>>::iterator next) {
|
||||
void Scheduler::switch_to(Thread *prev_raw, Container::Vector<Memory::unique_ptr<Thread>>::iterator next) {
|
||||
active = next;
|
||||
if (active >= ready_queue.end()) {
|
||||
active = ready_queue.begin();
|
||||
@ -139,7 +139,7 @@ void Scheduler::kill(uint32_t tid, Memory::unique_ptr<Thread> *ptr) {
|
||||
uint32_t prev_tid = (*active)->tid;
|
||||
|
||||
// Block queue, can always kill
|
||||
for (Container::vector<Memory::unique_ptr<Thread>>::iterator it = block_queue.begin(); it != block_queue.end(); ++it) {
|
||||
for (Container::Vector<Memory::unique_ptr<Thread>>::iterator it = block_queue.begin(); it != block_queue.end(); ++it) {
|
||||
if ((*it)->tid == tid) {
|
||||
// Found thread to kill
|
||||
|
||||
@ -165,7 +165,7 @@ void Scheduler::kill(uint32_t tid, Memory::unique_ptr<Thread> *ptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (Container::vector<Memory::unique_ptr<Thread>>::iterator it = ready_queue.begin(); it != ready_queue.end(); ++it) {
|
||||
for (Container::Vector<Memory::unique_ptr<Thread>>::iterator it = ready_queue.begin(); it != ready_queue.end(); ++it) {
|
||||
if ((*it)->tid == tid) {
|
||||
// Found thread to kill
|
||||
|
||||
@ -322,7 +322,7 @@ void Scheduler::deblock(uint32_t tid) {
|
||||
|
||||
Device::CPU::disable_int();
|
||||
|
||||
for (Container::vector<Memory::unique_ptr<Thread>>::iterator it = block_queue.begin(); it != block_queue.end(); ++it) {
|
||||
for (Container::Vector<Memory::unique_ptr<Thread>>::iterator it = block_queue.begin(); it != block_queue.end(); ++it) {
|
||||
if ((*it)->tid == tid) {
|
||||
// Found thread with correct tid
|
||||
|
||||
|
||||
@ -23,20 +23,20 @@ class Scheduler {
|
||||
private:
|
||||
NamedLogger log;
|
||||
|
||||
Container::vector<Memory::unique_ptr<Thread>> ready_queue;
|
||||
Container::vector<Memory::unique_ptr<Thread>> block_queue;
|
||||
Container::Vector<Memory::unique_ptr<Thread>> ready_queue;
|
||||
Container::Vector<Memory::unique_ptr<Thread>> block_queue;
|
||||
|
||||
// NOTE: It makes sense to keep track of the active thread through this as it makes handling the
|
||||
// unique_ptr easier and reduces the copying in the vector when cycling through the threads
|
||||
Container::vector<Memory::unique_ptr<Thread>>::iterator active = nullptr;
|
||||
Container::Vector<Memory::unique_ptr<Thread>>::iterator active = nullptr;
|
||||
|
||||
// Scheduler wird evt. von einer Unterbrechung vom Zeitgeber gerufen,
|
||||
// bevor er initialisiert wurde
|
||||
uint32_t idle_tid = 0U;
|
||||
|
||||
// Roughly the old dispatcher functionality
|
||||
void start(Container::vector<Memory::unique_ptr<Thread>>::iterator next); // Start next without prev
|
||||
void switch_to(Thread *prev_raw, Container::vector<Memory::unique_ptr<Thread>>::iterator next); // Switch from prev to next
|
||||
void start(Container::Vector<Memory::unique_ptr<Thread>>::iterator next); // Start next without prev
|
||||
void switch_to(Thread *prev_raw, Container::Vector<Memory::unique_ptr<Thread>>::iterator next); // Switch from prev to next
|
||||
|
||||
// Kann nur vom Idle-Thread aufgerufen werden (erster Thread der vom Scheduler gestartet wird)
|
||||
void enable_preemption(uint32_t tid) { idle_tid = tid; }
|
||||
|
||||
Reference in New Issue
Block a user