1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:17:35 +00:00

Kernel: Port PTYMultiplexer to ProtectedValue

This commit is contained in:
Andreas Kling 2021-08-07 15:18:14 +02:00
parent 7f2791f02e
commit 4c582b57e9
2 changed files with 27 additions and 24 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -43,10 +43,8 @@ private:
// ^CharacterDevice
virtual StringView class_name() const override { return "PTYMultiplexer"; }
Mutex m_lock { "PTYMultiplexer" };
static constexpr size_t max_pty_pairs = 64;
Vector<unsigned, max_pty_pairs> m_freelist;
ProtectedValue<Vector<unsigned, max_pty_pairs>> m_freelist;
};
}