mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
Implement /proc/PID/vm.
Refactored SyntheticFileSystem to maintain an arbitrary directory structure. ProcFileSystem creates a directory entry in /proc for each new process.
This commit is contained in:
parent
10347b9ae8
commit
a32b3a3ddf
Notes:
sideshowbarker
2024-07-19 18:38:09 +09:00
Author: https://github.com/awesomekling
Commit: a32b3a3ddf
15 changed files with 217 additions and 39 deletions
|
@ -3,15 +3,24 @@
|
|||
#include <AK/Types.h>
|
||||
#include <VirtualFileSystem/SyntheticFileSystem.h>
|
||||
|
||||
class Task;
|
||||
|
||||
class ProcFileSystem final : public SyntheticFileSystem {
|
||||
public:
|
||||
static ProcFileSystem& the();
|
||||
|
||||
virtual ~ProcFileSystem() override;
|
||||
static RetainPtr<ProcFileSystem> create();
|
||||
|
||||
virtual bool initialize() override;
|
||||
virtual const char* className() const override;
|
||||
|
||||
void addProcess(Task&);
|
||||
void removeProcess(Task&);
|
||||
|
||||
private:
|
||||
ProcFileSystem();
|
||||
|
||||
HashMap<pid_t, InodeIndex> m_pid2inode;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue