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:
parent
e78e032c19
commit
33d34d9b26
5 changed files with 29 additions and 15 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue