mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:52:43 +00:00 
			
		
		
		
	 673592dea8
			
		
	
	
		673592dea8
		
	
	
	
	
		
			
			There was only one permanent storage location for these: as a member in the Mount class. That member is never modified after Mount initialization, so we don't need to worry about races there.
		
			
				
	
	
		
			38 lines
		
	
	
	
		
			803 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
	
		
			803 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Types.h>
 | |
| #include <Kernel/FileSystem/FileSystem.h>
 | |
| #include <Kernel/FileSystem/Inode.h>
 | |
| #include <Kernel/Forward.h>
 | |
| 
 | |
| namespace Kernel {
 | |
| 
 | |
| class ProcFSInode;
 | |
| class ProcFS final : public FileSystem {
 | |
|     friend class ProcFSInode;
 | |
|     friend class Process;
 | |
| 
 | |
| public:
 | |
|     virtual ~ProcFS() override;
 | |
|     static ErrorOr<NonnullRefPtr<FileSystem>> try_create();
 | |
| 
 | |
|     virtual ErrorOr<void> initialize() override;
 | |
|     virtual StringView class_name() const override { return "ProcFS"sv; }
 | |
| 
 | |
|     virtual Inode& root_inode() override;
 | |
| 
 | |
| private:
 | |
|     ProcFS();
 | |
| 
 | |
|     ErrorOr<NonnullRefPtr<Inode>> get_inode(InodeIdentifier) const;
 | |
| 
 | |
|     RefPtr<ProcFSInode> m_root_inode;
 | |
| };
 | |
| 
 | |
| }
 |