1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:37:35 +00:00

Kernel: Use Processor::wait_check in loops waiting for HW to respond

This gives the processor the hint that it is in a hot loop and allows us
to do other work in between
This commit is contained in:
Hendiadyoin1 2023-09-12 14:58:55 +02:00 committed by Andrew Kaster
parent cbaa3465a8
commit a2810d3cf8
9 changed files with 31 additions and 36 deletions

View file

@ -91,7 +91,7 @@ UNMAP_AFTER_INIT bool APICTimer::calibrate(HardwareTimerBase& calibration_source
sti();
// Loop for about 100 ms
while (state.calibration_ticks.load() <= state.ticks_in_100ms)
;
Processor::wait_check();
cli();
// Restore timer callbacks