mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:57:44 +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:
parent
cbaa3465a8
commit
a2810d3cf8
9 changed files with 31 additions and 36 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <Kernel/Arch/DebugOutput.h>
|
||||
#include <Kernel/Arch/x86_64/BochsDebugOutput.h>
|
||||
#include <Kernel/Arch/x86_64/IO.h>
|
||||
#include <Kernel/Arch/x86_64/Processor.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -35,7 +36,7 @@ void debug_output(char ch)
|
|||
}
|
||||
|
||||
while ((IO::in8(serial_com1_io_port + 5) & 0x20) == 0)
|
||||
;
|
||||
Processor::wait_check();
|
||||
|
||||
if (ch == '\n' && !was_cr)
|
||||
IO::out8(serial_com1_io_port, '\r');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue