mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 13:12:46 +00:00 
			
		
		
		
	Kernel: Factor our PreviousMode into RegisterState::previous_mode
Various places in the kernel were manually checking the cs register for x86_64, however to share this with aarch64 a function in RegisterState is added, and the call-sites are updated. While we're here the PreviousMode enum is renamed to ExecutionMode.
This commit is contained in:
		
							parent
							
								
									247109cee6
								
							
						
					
					
						commit
						fb10774862
					
				
					 11 changed files with 53 additions and 29 deletions
				
			
		
							
								
								
									
										18
									
								
								Kernel/ExecutionMode.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								Kernel/ExecutionMode.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| /*
 | ||||
|  * Copyright (c) 2021, the SerenityOS developers. | ||||
|  * | ||||
|  * SPDX-License-Identifier: BSD-2-Clause | ||||
|  */ | ||||
| 
 | ||||
| #pragma once | ||||
| 
 | ||||
| #include <AK/Types.h> | ||||
| 
 | ||||
| namespace Kernel { | ||||
| 
 | ||||
| enum class ExecutionMode : u8 { | ||||
|     Kernel = 0, | ||||
|     User, | ||||
| }; | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timon Kruiper
						Timon Kruiper