Compare commits
2 Commits
49c3ff8499
...
faa71d08c5
Author | SHA1 | Date |
---|---|---|
|
faa71d08c5 | |
|
feb7c8e839 |
|
@ -116,7 +116,7 @@ impl Executor {
|
||||||
loop {
|
loop {
|
||||||
self.run_ready_tasks();
|
self.run_ready_tasks();
|
||||||
// TODO: We need some sort of semaphore wait here.
|
// TODO: We need some sort of semaphore wait here.
|
||||||
syscall::thread_sleep(50).unwrap();
|
syscall::thread_sleep(10).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "interrupt/apic.h"
|
#include "interrupt/apic.h"
|
||||||
#include "interrupt/timer.h"
|
#include "interrupt/timer.h"
|
||||||
|
|
||||||
const uint32_t kScheduleFrequency = 20;
|
const uint32_t kScheduleFrequency = 100;
|
||||||
ApicTimer* gApicTimer = nullptr;
|
ApicTimer* gApicTimer = nullptr;
|
||||||
|
|
||||||
void ApicTimer::Init() {
|
void ApicTimer::Init() {
|
||||||
|
|
|
@ -186,12 +186,12 @@ uint64_t cnt = 0;
|
||||||
extern "C" void isr_apic_timer();
|
extern "C" void isr_apic_timer();
|
||||||
extern "C" void interrupt_apic_timer(InterruptFrame*) {
|
extern "C" void interrupt_apic_timer(InterruptFrame*) {
|
||||||
cnt++;
|
cnt++;
|
||||||
if (cnt % 20 == 0) {
|
if (cnt % 100 == 0) {
|
||||||
if (cnt == 20) {
|
if (cnt == 20) {
|
||||||
KernelHeap::DumpDebugData();
|
KernelHeap::DumpDebugData();
|
||||||
phys_mem::DumpPhysicalMemoryUsage();
|
phys_mem::DumpPhysicalMemoryUsage();
|
||||||
}
|
}
|
||||||
dbgln("timer: {}s", cnt * 50 / 1000);
|
dbgln("timer: {}s", cnt * 10 / 1000);
|
||||||
}
|
}
|
||||||
gApic->SignalEOI();
|
gApic->SignalEOI();
|
||||||
gScheduler->Preempt();
|
gScheduler->Preempt();
|
||||||
|
|
Loading…
Reference in New Issue