mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:12:43 +00:00 
			
		
		
		
	Kernel: Defer handling of key press events in VirtualConsole
Trying to pass these onto the Terminal while handling an IRQ is a recipe for disaster. Use Processor::deferred_call_queue to create an ad-hoc "second half" of the interrupt handler. Fixes #4889
This commit is contained in:
		
							parent
							
								
									d8aed14dba
								
							
						
					
					
						commit
						a5e557472c
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -238,7 +238,9 @@ void VirtualConsole::on_key_pressed(KeyboardDevice::Event event) | |||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     m_terminal.handle_key_press(event.key, event.code_point, event.flags); | ||||
|     Processor::deferred_call_queue([this, event]() { | ||||
|         m_terminal.handle_key_press(event.key, event.code_point, event.flags); | ||||
|     }); | ||||
| } | ||||
| 
 | ||||
| ssize_t VirtualConsole::on_tty_write(const UserOrKernelBuffer& data, ssize_t size) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andrew Kaster
						Andrew Kaster