summaryrefslogtreecommitdiff
path: root/Kernel/ProcFileSystem.h
blob: 5f6aa061d14ddb757dfbd8f93a3e79974d3ac451 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include <AK/Types.h>
#include <VirtualFileSystem/SyntheticFileSystem.h>

class Process;

class ProcFS final : public SynthFS {
public:
    static ProcFS& the() PURE;

    virtual ~ProcFS() override;
    static RetainPtr<ProcFS> create();

    virtual bool initialize() override;
    virtual const char* class_name() const override;

    void add_process(Process&);
    void remove_process(Process&);

private:
    ProcFS();

    HashMap<pid_t, InodeIndex> m_pid2inode;
};