cleanup
This commit is contained in:
@ -14,7 +14,6 @@
|
|||||||
#include "kernel/threads/Thread.h"
|
#include "kernel/threads/Thread.h"
|
||||||
#include "lib/SpinLock.h"
|
#include "lib/SpinLock.h"
|
||||||
#include "user/lib/Vector.h"
|
#include "user/lib/Vector.h"
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
class Semaphore {
|
class Semaphore {
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
#include "user/lib/Logger.h"
|
#include "user/lib/Logger.h"
|
||||||
#include "kernel/Globals.h"
|
#include "kernel/Globals.h"
|
||||||
|
|
||||||
SpinLock Logger::sem;
|
|
||||||
bool Logger::kout_enabled = true;
|
bool Logger::kout_enabled = true;
|
||||||
bool Logger::serial_enabled = true;
|
bool Logger::serial_enabled = true;
|
||||||
|
|
||||||
|
|||||||
@ -24,9 +24,9 @@ private:
|
|||||||
void log(const char* message, CGA::color col) const;
|
void log(const char* message, CGA::color col) const;
|
||||||
|
|
||||||
friend class NamedLogger; // Allow NamedLogger to lock/unlock
|
friend class NamedLogger; // Allow NamedLogger to lock/unlock
|
||||||
static SpinLock sem;
|
SpinLock sem; // Semaphore would be a cyclic include
|
||||||
static void lock() { Logger::sem.acquire(); }
|
static void lock() { Logger::instance().sem.acquire(); }
|
||||||
static void unlock() { Logger::sem.release(); }
|
static void unlock() { Logger::instance().sem.release(); }
|
||||||
// static void lock() {}
|
// static void lock() {}
|
||||||
// static void unlock() {}
|
// static void unlock() {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user