haiku/src/servers
Stephan Aßmus 4d1c422802 * added a way for the ServerWindow message loop to determine the required type
of locking before processing the message (single/all window lock)
  -> in most message cases, I could comment out the unlocking/locking which
  switched to the different lock, because the required lock is now already held,
  this removes some race conditions which were commented in the code already
* EventDispatcher::SetDragMessage() didn't lock the object, this would have
  been bad if multiple windows tried to set a drag bitmap at once
* the Desktop object keeps track of mouse position and pressed buttons, so
  that it doesn't need to lock the EventDispatcher for sending fake mouse
  moves to windows on show/hide of windows (solves some cases of possible
  dead locks with the new locking strategy)
* the keyboard EventFilter switches the current workspace asynchrnously from
  the Desktop thread (another source of possible deadlocks)
* the "reader is trying to become writer" check in MultiLocker is only used
  in DEBUG mode now

As a summary: It would be nice if ServerWindow used a readlock for all messages
it processes itself, and forwards all messages for which it needs a write lock
to the Desktop thread. All cases where either the Desktop or the ServerWindow
mess with the EventDispatcher are possible sources of deadlocks. This is solved
right now by making sure that the lock is released before using the
EventDispatcher.

I have not observed any deadlocks while switching workspaces and launching
many apps anymore, neither crashes. But I have not tested extensively except
for in the test environment. That being said, I could reproduce the problems
on first try before in Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 14:09:11 +00:00
..
app * added a way for the ServerWindow message loop to determine the required type 2007-10-02 14:09:11 +00:00
debug Always allow debugging a team, even if it wasn't possible to get its 2007-08-12 23:49:38 +00:00
input the keymap is now saved when key locks or key modifiers are changed 2007-07-16 18:40:32 +00:00
mail * Prefixed the variables NETWORK_LIBS, NETAPI_LIB, and 2007-08-12 22:15:10 +00:00
media clean unused includes 2007-04-19 22:02:13 +00:00
media_addon Sound events are now played with a BSoundPlayer, because it's more easy to handle restart and have a correct name displayed in the mixer. Sound players are reused when possible 2007-04-19 21:59:55 +00:00
midi Made all server version and signatures consistent, and thus closing bug #909. 2006-10-22 17:56:02 +00:00
net Accidently left in some debug output. 2007-07-05 12:24:11 +00:00
power Merged changes from branch build_system_redesign at revision 14573. 2005-10-29 16:27:43 +00:00
print Undo last change (Search spool folder by name stored in attribute 2007-07-30 17:41:06 +00:00
registrar This fixes the problem of launching more than one document with one application 2007-09-24 21:48:06 +00:00
services_daemon Added app restart capabilities 2007-01-06 13:20:01 +00:00
syslog_daemon axeld: 2007-07-19 13:38:12 +00:00
Jamfile Initial checkin. Works fine for me so far, but YMMV. Bug reports appreciated. 2006-12-21 21:12:58 +00:00