DevPtsFS.h 594 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include "SlavePTY.h"
  3. #include <AK/Types.h>
  4. #include <Kernel/SyntheticFileSystem.h>
  5. class Process;
  6. class DevPtsFS final : public SynthFS {
  7. public:
  8. static DevPtsFS& the() PURE;
  9. virtual ~DevPtsFS() override;
  10. static RetainPtr<DevPtsFS> create();
  11. virtual bool initialize() override;
  12. virtual const char* class_name() const override;
  13. void register_slave_pty(SlavePTY&);
  14. void unregister_slave_pty(SlavePTY&);
  15. private:
  16. DevPtsFS();
  17. RetainPtr<SynthFSInode> create_slave_pty_device_file(unsigned index);
  18. HashTable<SlavePTY*> m_slave_ptys;
  19. };