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

Kernel: Protect PTYMultiplexer freelist with spinlock instead of mutex

This commit is contained in:
Andreas Kling 2022-02-03 01:28:14 +01:00
parent 6fbb924bbf
commit 0899153170
2 changed files with 4 additions and 5 deletions

View file

@ -8,7 +8,6 @@
#include <AK/Badge.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/Locking/Mutex.h>
namespace Kernel {
@ -36,7 +35,7 @@ private:
virtual StringView class_name() const override { return "PTYMultiplexer"sv; }
static constexpr size_t max_pty_pairs = 64;
MutexProtected<Vector<unsigned, max_pty_pairs>> m_freelist;
SpinlockProtected<Vector<unsigned, max_pty_pairs>> m_freelist;
};
}