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

Kernel: Use a Lockable<bool> for sysctl booleans as well.

This commit is contained in:
Andreas Kling 2019-02-08 16:18:24 +01:00
parent e78e032c19
commit 33d34d9b26
5 changed files with 29 additions and 15 deletions

View file

@ -103,6 +103,12 @@ public:
Lock& lock() { return m_lock; }
T& resource() { return m_resource; }
T lock_and_copy()
{
LOCKER(m_lock);
return m_resource;
}
private:
T m_resource;
Lock m_lock;