mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:02:44 +00:00 
			
		
		
		
	 4314c25cf2
			
		
	
	
		4314c25cf2
		
	
	
	
	
		
			
			All users which relied on the default constructor use a None lock rank for now. This will make it easier to in the future remove LockRank and actually annotate the ranks by searching for None.
		
			
				
	
	
		
			33 lines
		
	
	
	
		
			845 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			845 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021-2022, Liav A. <liavalb@hotmail.co.il>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Badge.h>
 | |
| #include <Kernel/Bus/USB/USBDevice.h>
 | |
| #include <Kernel/Bus/USB/USBHub.h>
 | |
| #include <Kernel/FileSystem/SysFS/Component.h>
 | |
| #include <Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h>
 | |
| #include <Kernel/Locking/Spinlock.h>
 | |
| 
 | |
| namespace Kernel {
 | |
| 
 | |
| class SysFSUSBBusDirectory final : public SysFSDirectory {
 | |
| public:
 | |
|     static void initialize();
 | |
|     static SysFSUSBBusDirectory& the();
 | |
| 
 | |
|     virtual StringView name() const override { return "usb"sv; }
 | |
| 
 | |
|     void plug(Badge<USB::Hub>, SysFSUSBDeviceInformation&);
 | |
|     void unplug(Badge<USB::Hub>, SysFSUSBDeviceInformation&);
 | |
| 
 | |
| private:
 | |
|     explicit SysFSUSBBusDirectory(SysFSBusDirectory&);
 | |
|     mutable Spinlock m_lock { LockRank::None };
 | |
| };
 | |
| 
 | |
| }
 |