Fixed debug build.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35820 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2010-03-12 11:07:23 +00:00
parent 2d263cff46
commit 8b56f14aeb
6 changed files with 20 additions and 9 deletions
+2 -2
View File
@@ -149,7 +149,7 @@ MultiLocker::InitCheck()
contained. contained.
*/ */
bool bool
MultiLocker::IsWriteLocked(uint32* _stackBase, thread_id* _thread) MultiLocker::IsWriteLocked(uint32* _stackBase, thread_id* _thread) const
{ {
#if TIMING #if TIMING
bigtime_t start = system_time(); bigtime_t start = system_time();
@@ -518,7 +518,7 @@ MultiLocker::WriteUnlock()
bool bool
MultiLocker::IsReadLocked() MultiLocker::IsReadLocked() const
{ {
if (fInit == B_NO_INIT) if (fInit == B_NO_INIT)
return false; return false;
+2 -2
View File
@@ -57,12 +57,12 @@ public:
// does the current thread hold a write lock ? // does the current thread hold a write lock ?
bool IsWriteLocked(uint32 *stackBase = NULL, bool IsWriteLocked(uint32 *stackBase = NULL,
thread_id *thread = NULL); thread_id *thread = NULL) const;
#if MULTI_LOCKER_DEBUG #if MULTI_LOCKER_DEBUG
// in DEBUG mode returns whether the lock is held // in DEBUG mode returns whether the lock is held
// in non-debug mode returns true // in non-debug mode returns true
bool IsReadLocked(); bool IsReadLocked() const;
#endif #endif
private: private:
+3 -3
View File
@@ -3188,7 +3188,7 @@ ServerApp::_AddBitmap(ServerBitmap* bitmap)
void void
ServerApp::_DeleteBitmap(ServerBitmap* bitmap) ServerApp::_DeleteBitmap(ServerBitmap* bitmap)
{ {
ASSERT(fMapLock.IsLocked()); ASSERT(fMapLocker.IsLocked());
gBitmapManager->BitmapRemoved(bitmap); gBitmapManager->BitmapRemoved(bitmap);
fBitmapMap.erase(bitmap->Token()); fBitmapMap.erase(bitmap->Token());
@@ -3200,7 +3200,7 @@ ServerApp::_DeleteBitmap(ServerBitmap* bitmap)
ServerBitmap* ServerBitmap*
ServerApp::_FindBitmap(int32 token) const ServerApp::_FindBitmap(int32 token) const
{ {
ASSERT(fMapLock.IsLocked()); ASSERT(fMapLocker.IsLocked());
BitmapMap::const_iterator iterator = fBitmapMap.find(token); BitmapMap::const_iterator iterator = fBitmapMap.find(token);
if (iterator == fBitmapMap.end()) if (iterator == fBitmapMap.end())
@@ -3213,7 +3213,7 @@ ServerApp::_FindBitmap(int32 token) const
ServerPicture* ServerPicture*
ServerApp::_FindPicture(int32 token) const ServerApp::_FindPicture(int32 token) const
{ {
ASSERT(fMapLock.IsLocked()); ASSERT(fMapLocker.IsLocked());
PictureMap::const_iterator iterator = fPictureMap.find(token); PictureMap::const_iterator iterator = fPictureMap.find(token);
if (iterator == fPictureMap.end()) if (iterator == fPictureMap.end())
@@ -126,6 +126,15 @@ DrawingEngine::LockParallelAccess()
} }
#if DEBUG
bool
DrawingEngine::IsParallelAccessLocked() const
{
return fGraphicsCard->IsParallelAccessLocked();
}
#endif
void void
DrawingEngine::UnlockParallelAccess() DrawingEngine::UnlockParallelAccess()
{ {
+3 -1
View File
@@ -50,7 +50,9 @@ public:
// locking // locking
bool LockParallelAccess(); bool LockParallelAccess();
bool IsParallelAccessLocked(); #if DEBUG
bool IsParallelAccessLocked() const;
#endif
void UnlockParallelAccess(); void UnlockParallelAccess();
bool LockExclusiveAccess(); bool LockExclusiveAccess();
+1 -1
View File
@@ -57,7 +57,7 @@ public:
// locking // locking
bool LockParallelAccess() { return ReadLock(); } bool LockParallelAccess() { return ReadLock(); }
#if DEBUG #if DEBUG
bool IsParallelAccessLocked() bool IsParallelAccessLocked() const
{ return IsReadLocked(); } { return IsReadLocked(); }
#endif #endif
void UnlockParallelAccess() { ReadUnlock(); } void UnlockParallelAccess() { ReadUnlock(); }