mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:12:45 +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
				
			
		|  | @ -66,7 +66,7 @@ ErrorOr<size_t> SerialDevice::write(OpenFileDescription& description, u64, UserO | |||
| void SerialDevice::put_char(char ch) | ||||
| { | ||||
|     while ((get_line_status() & EmptyTransmitterHoldingRegister) == 0) | ||||
|         ; | ||||
|         Processor::wait_check(); | ||||
| 
 | ||||
|     if (ch == '\n' && !m_last_put_char_was_carriage_return) | ||||
|         m_registers_io_window->write8(0, '\r'); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Hendiadyoin1
						Hendiadyoin1