AutoLocker: get ability to get lockable

Change-Id: Id8f554494ce83725c40ccebdf0e58e54bf1bf47c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4920
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
X512 2022-01-30 15:49:15 +09:00 committed by waddlesplash
parent fce7f3a748
commit 32fd04c959

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)