AutoLocker: get ability to get lockable

Change-Id: Id8f554494ce83725c40ccebdf0e58e54bf1bf47c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4920
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
X512
2022-02-02 19:45:27 +00:00
committed by waddlesplash
parent fce7f3a748
commit 32fd04c959
+8 -1
View File
@@ -155,10 +155,17 @@ public:
}
}
inline void Detach()
inline Lockable* Get()
{
return fLockable;
}
inline Lockable* Detach()
{
Lockable* res = fLockable;
fLockable = NULL;
fLocked = false;
return res;
}
inline AutoLocker<Lockable, Locking>& operator=(Lockable* lockable)