* Replaced DEBUG MultiLocker with an implementation that actually helps debugging

locking problems (instead of debugging the locker class).
* MultiLocker::IsReadLocked() is now only exported with DEBUG mode turned on, as
  it only works correctly in this case.
* Made MultiLocker safe against B_INTERRUPTED, ie. it now just tries to lock again
  instead of failing for no obvious reason.
* Removed bogus arguments to acquire_sem_etc() in MultiLocker (like B_DO_NOT_RESCHEDULE).
* Applied coding style to MultiLocker.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20055 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-02-02 19:16:18 +00:00
parent cb134e2550
commit 4d1fd46cdf
4 changed files with 534 additions and 442 deletions
+4 -1
View File
@@ -456,8 +456,11 @@ DesktopSettings::DesktopSettings(Desktop* desktop)
:
fSettings(desktop->fSettings)
{
if (!desktop->fWindowLock.IsReadLocked() && !desktop->fWindowLock.IsWriteLocked())
#if DEBUG
if (!desktop->fWindowLock.IsWriteLocked()
&& !desktop->fWindowLock.IsReadLocked())
debugger("desktop not locked when trying to access settings");
#endif
}