mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:42:44 +00:00 
			
		
		
		
	 11eee67b85
			
		
	
	
		11eee67b85
		
	
	
	
	
		
			
			Until now, our kernel has reimplemented a number of AK classes to provide automatic internal locking: - RefPtr - NonnullRefPtr - WeakPtr - Weakable This patch renames the Kernel classes so that they can coexist with the original AK classes: - RefPtr => LockRefPtr - NonnullRefPtr => NonnullLockRefPtr - WeakPtr => LockWeakPtr - Weakable => LockWeakable The goal here is to eventually get rid of the Lock* classes in favor of using external locking.
		
			
				
	
	
		
			38 lines
		
	
	
	
		
			1,014 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
	
		
			1,014 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Types.h>
 | |
| #include <Kernel/Bus/PCI/Device.h>
 | |
| #include <Kernel/Graphics/Bochs/Definitions.h>
 | |
| #include <Kernel/Graphics/Console/GenericFramebufferConsole.h>
 | |
| #include <Kernel/Graphics/GenericGraphicsAdapter.h>
 | |
| #include <Kernel/Memory/TypedMapping.h>
 | |
| #include <Kernel/PhysicalAddress.h>
 | |
| 
 | |
| namespace Kernel {
 | |
| 
 | |
| class GraphicsManagement;
 | |
| struct BochsDisplayMMIORegisters;
 | |
| 
 | |
| class BochsDisplayConnector;
 | |
| class BochsGraphicsAdapter final : public GenericGraphicsAdapter
 | |
|     , public PCI::Device {
 | |
|     friend class GraphicsManagement;
 | |
| 
 | |
| public:
 | |
|     static NonnullLockRefPtr<BochsGraphicsAdapter> initialize(PCI::DeviceIdentifier const&);
 | |
|     virtual ~BochsGraphicsAdapter() = default;
 | |
| 
 | |
| private:
 | |
|     ErrorOr<void> initialize_adapter(PCI::DeviceIdentifier const&);
 | |
| 
 | |
|     explicit BochsGraphicsAdapter(PCI::DeviceIdentifier const&);
 | |
| 
 | |
|     LockRefPtr<BochsDisplayConnector> m_display_connector;
 | |
| };
 | |
| }
 |