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:
Axel Dörfler
2002-11-25 17:36:53 +00:00
parent 0f374ebc88
commit d88937ace2
@@ -360,6 +360,11 @@ class SimpleLock {
atomic_set(&fHolder, -1);
}
bool IsLocked() const
{
return fHolder == find_thread(NULL);
}
private:
vint32 fHolder;
vint32 fCount;