ladybird/Kernel/DevPtsFS.h
Andreas Kling 022f7790db Use modern C++ attributes instead of __attribute__ voodoo.
This is quite nice, although I wish [[gnu::always_inline]] implied inline.
Also "gnu::" is kind of a wart, but whatcha gonna do.
2019-02-15 12:30:48 +01:00

29 lines
597 B
C++

#pragma once
#include <AK/Types.h>
#include <Kernel/SyntheticFileSystem.h>
class Process;
class SlavePTY;
class DevPtsFS final : public SynthFS {
public:
[[gnu::pure]] static DevPtsFS& the();
virtual ~DevPtsFS() override;
static RetainPtr<DevPtsFS> create();
virtual bool initialize() override;
virtual const char* class_name() const override;
void register_slave_pty(SlavePTY&);
void unregister_slave_pty(SlavePTY&);
private:
DevPtsFS();
RetainPtr<SynthFSInode> create_slave_pty_device_file(unsigned index);
HashTable<SlavePTY*> m_slave_ptys;
};