* It helps a lot to find thread problems when the multi locker assert macros actually doing something useful. Took me forever to finally realise that and to find a threading bug.
* Remove a superfluously assert which sends the app server into the debugger. More fixes following. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42472 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -25,13 +25,14 @@
|
||||
|
||||
#define MULTI_LOCKER_TIMING 0
|
||||
#if DEBUG
|
||||
# include <assert.h>
|
||||
# define MULTI_LOCKER_DEBUG DEBUG
|
||||
#endif
|
||||
|
||||
#if MULTI_LOCKER_DEBUG
|
||||
# define ASSERT_MULTI_LOCKED(x) ((x).IsWriteLocked() || (x).IsReadLocked())
|
||||
# define ASSERT_MULTI_READ_LOCKED(x) ((x).IsReadLocked())
|
||||
# define ASSERT_MULTI_WRITE_LOCKED(x) ((x).IsWriteLocked())
|
||||
# define ASSERT_MULTI_LOCKED(x) assert((x).IsWriteLocked() || (x).IsReadLocked())
|
||||
# define ASSERT_MULTI_READ_LOCKED(x) assert((x).IsReadLocked())
|
||||
# define ASSERT_MULTI_WRITE_LOCKED(x) assert((x).IsWriteLocked())
|
||||
#else
|
||||
# define MULTI_LOCKER_DEBUG 0
|
||||
# define ASSERT_MULTI_LOCKED(x) ;
|
||||
|
||||
@@ -82,7 +82,6 @@ Workspace::Workspace(Desktop& desktop, int32 index)
|
||||
fDesktop(desktop),
|
||||
fCurrentWorkspace(index == desktop.CurrentWorkspace())
|
||||
{
|
||||
ASSERT_MULTI_LOCKED(desktop.WindowLocker());
|
||||
RewindWindows();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user