mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 09:18:05 +03:00
Kernel: Increase maximum PTY count from 8 to 64
Let's allow users to allocate more pseudo-terminals if they want.
This commit is contained in:
parent
c4604bc080
commit
7f2791f02e
Notes:
sideshowbarker
2024-07-18 07:18:29 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/7f2791f02eb
@ -24,7 +24,6 @@ PTYMultiplexer& PTYMultiplexer::the()
|
||||
UNMAP_AFTER_INIT PTYMultiplexer::PTYMultiplexer()
|
||||
: CharacterDevice(5, 2)
|
||||
{
|
||||
constexpr unsigned max_pty_pairs = 8;
|
||||
m_freelist.ensure_capacity(max_pty_pairs);
|
||||
for (int i = max_pty_pairs; i > 0; --i)
|
||||
m_freelist.unchecked_append(i - 1);
|
||||
|
@ -44,7 +44,9 @@ private:
|
||||
virtual StringView class_name() const override { return "PTYMultiplexer"; }
|
||||
|
||||
Mutex m_lock { "PTYMultiplexer" };
|
||||
Vector<unsigned> m_freelist;
|
||||
|
||||
static constexpr size_t max_pty_pairs = 64;
|
||||
Vector<unsigned, max_pty_pairs> m_freelist;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user