mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 23:28:12 +00:00
Kernel: Only use the TSC when it is invariant
This commit is contained in:
parent
cf48200e7b
commit
0cfcac7900
1 changed files with 1 additions and 2 deletions
|
@ -381,8 +381,7 @@ UNMAP_AFTER_INIT void Scheduler::initialize()
|
||||||
VERIFY(Processor::is_initialized()); // sanity check
|
VERIFY(Processor::is_initialized()); // sanity check
|
||||||
|
|
||||||
// Figure out a good scheduling time source
|
// Figure out a good scheduling time source
|
||||||
if (Processor::current().has_feature(CPUFeature::TSC)) {
|
if (Processor::current().has_feature(CPUFeature::TSC) && Processor::current().has_feature(CPUFeature::CONSTANT_TSC)) {
|
||||||
// TODO: only use if TSC is running at a constant frequency?
|
|
||||||
current_time = current_time_tsc;
|
current_time = current_time_tsc;
|
||||||
} else {
|
} else {
|
||||||
// TODO: Using HPET is rather slow, can we use any other time source that may be faster?
|
// TODO: Using HPET is rather slow, can we use any other time source that may be faster?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue