Added a SimpleLock.IsLocked() method.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2082 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -360,6 +360,11 @@ class SimpleLock {
|
|||||||
atomic_set(&fHolder, -1);
|
atomic_set(&fHolder, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsLocked() const
|
||||||
|
{
|
||||||
|
return fHolder == find_thread(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
vint32 fHolder;
|
vint32 fHolder;
|
||||||
vint32 fCount;
|
vint32 fCount;
|
||||||
|
|||||||
Reference in New Issue
Block a user