[kernel] Fix scheduler clock bug

The fake clock in the scheduler wasn't getting initialized, so sleeps in
the test userspace programs were returning immediately.
This commit is contained in:
Justin C. Miller
2020-06-02 23:46:03 -07:00
parent 64ad65fa1b
commit ea1224e213
2 changed files with 10 additions and 9 deletions

View File

@@ -24,8 +24,8 @@ public:
/// How long the timer quantum is
static const uint64_t quantum_micros = 1000;
/// How many quantums a process gets before being rescheduled
static const uint16_t process_quanta = 100;
/// How many quanta a process gets before being rescheduled
static const uint16_t process_quanta = 10;
/// Constructor.
/// \arg apic Pointer to the local APIC object
@@ -88,5 +88,8 @@ private:
process_list m_blocked;
process_list m_exited;
// TODO: lol a real clock
uint64_t m_clock = 0;
static scheduler s_instance;
};