2019-01-30 02:49:20 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/Types.h>
|
|
|
|
#include <Kernel/SyntheticFileSystem.h>
|
|
|
|
|
|
|
|
class Process;
|
2019-01-30 20:26:19 +03:00
|
|
|
class SlavePTY;
|
2019-01-30 02:49:20 +03:00
|
|
|
|
|
|
|
class DevPtsFS final : public SynthFS {
|
|
|
|
public:
|
2019-02-15 14:30:48 +03:00
|
|
|
[[gnu::pure]] static DevPtsFS& the();
|
2019-01-30 02:49:20 +03:00
|
|
|
|
|
|
|
virtual ~DevPtsFS() override;
|
2019-02-25 14:43:52 +03:00
|
|
|
static Retained<DevPtsFS> create();
|
2019-01-30 02:49:20 +03:00
|
|
|
|
|
|
|
virtual bool initialize() override;
|
|
|
|
virtual const char* class_name() const override;
|
|
|
|
|
|
|
|
void register_slave_pty(SlavePTY&);
|
|
|
|
void unregister_slave_pty(SlavePTY&);
|
|
|
|
|
|
|
|
private:
|
|
|
|
DevPtsFS();
|
|
|
|
|
2019-02-25 14:43:52 +03:00
|
|
|
Retained<SynthFSInode> create_slave_pty_device_file(unsigned index);
|
2019-01-30 02:49:20 +03:00
|
|
|
|
|
|
|
HashTable<SlavePTY*> m_slave_ptys;
|
|
|
|
};
|
|
|
|
|