mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 01:27: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
|
@ -160,13 +160,13 @@ void UART::set_baud_rate(int baud_rate, int uart_frequency_in_hz)
|
|||
void UART::wait_until_we_can_send()
|
||||
{
|
||||
while (m_registers->flag & TransmitFifoFull)
|
||||
;
|
||||
Processor::wait_check();
|
||||
}
|
||||
|
||||
void UART::wait_until_we_can_receive()
|
||||
{
|
||||
while (m_registers->flag & ReceiveFifoEmpty)
|
||||
;
|
||||
Processor::wait_check();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue