1
This commit is contained in:
2022-07-24 00:33:14 +02:00
parent 605d4e8c8d
commit e4469e51b2
3 changed files with 3 additions and 5 deletions

View File

@ -14,7 +14,6 @@
#include "kernel/threads/Thread.h"
#include "lib/SpinLock.h"
#include "user/lib/Vector.h"
#include <vector>
class Semaphore {
private:

View File

@ -1,7 +1,6 @@
#include "user/lib/Logger.h"
#include "kernel/Globals.h"
SpinLock Logger::sem;
bool Logger::kout_enabled = true;
bool Logger::serial_enabled = true;

View File

@ -24,9 +24,9 @@ private:
void log(const char* message, CGA::color col) const;
friend class NamedLogger; // Allow NamedLogger to lock/unlock
static SpinLock sem;
static void lock() { Logger::sem.acquire(); }
static void unlock() { Logger::sem.release(); }
SpinLock sem; // Semaphore would be a cyclic include
static void lock() { Logger::instance().sem.acquire(); }
static void unlock() { Logger::instance().sem.release(); }
// static void lock() {}
// static void unlock() {}