Kernel: Fix system timer disabling

I was actually not disabling system timer (HPET, PIT) when using lapic
timers for scheduling. This made BSB get too many timer interrupts :D
This commit is contained in:
Bananymous 2025-07-16 20:02:04 +03:00
parent 3960687f9d
commit 793cca423b
1 changed files with 3 additions and 2 deletions

View File

@ -20,13 +20,12 @@ namespace Kernel
virtual bool pre_scheduler_sleep_needs_lock() const = 0; virtual bool pre_scheduler_sleep_needs_lock() const = 0;
virtual void pre_scheduler_sleep_ns(uint64_t) = 0; virtual void pre_scheduler_sleep_ns(uint64_t) = 0;
void dont_invoke_scheduler() { m_should_invoke_scheduler = false; }
protected: protected:
bool should_invoke_scheduler() const { return m_should_invoke_scheduler; } bool should_invoke_scheduler() const { return m_should_invoke_scheduler; }
private: private:
bool m_should_invoke_scheduler { true }; bool m_should_invoke_scheduler { true };
friend class SystemTimer;
}; };
class SystemTimer : public Timer class SystemTimer : public Timer
@ -46,6 +45,8 @@ namespace Kernel
void sleep_ms(uint64_t ms) const { ASSERT(!BAN::Math::will_multiplication_overflow<uint64_t>(ms, 1'000'000)); return sleep_ns(ms * 1'000'000); } void sleep_ms(uint64_t ms) const { ASSERT(!BAN::Math::will_multiplication_overflow<uint64_t>(ms, 1'000'000)); return sleep_ns(ms * 1'000'000); }
void sleep_ns(uint64_t ns) const; void sleep_ns(uint64_t ns) const;
void dont_invoke_scheduler() { m_timer->m_should_invoke_scheduler = false; }
timespec real_time() const; timespec real_time() const;
private: private: