dlls/dinput/mouse.c warp handling

Mike Hearn mike at navi.cx
Thu Jun 17 08:23:15 CDT 2004


On Thu, 17 Jun 2004 14:43:54 +0200, James Dean Anderson wrote:
> successful... it's just that threads and events always scared me (-:

I bugged Newman yesterday and because he's a total rockstar he fixed the
bug in the doc generation script, so the latest developer guide is now on
the net:

  http://winehq.com/site/docs/wine-devel/threading

explains the Wine multi-threading in more detail than you probably want,
however if you read the first section it may help. Basically a critical
section is a mutex (or MUTual EXclusion): when one thread has entered the
critical section all other threads that try to enter queue up at the
entrance until the thread currently inside leaves.

This allows you to prevent multiple threads from running the same piece of
code at once. It's essential for things like linked list manipulation.
Because the entirety of Win32 is thread safe you will see this sort of
thing all over the place.

If a thread deadlocks on a critical section (ie is queued up waiting to
enter for a long time) you will see a message like this:

err:ntdll:RtlpWaitForCriticalSection thread 0x9 timed out waiting for
thread 0x10 in 0x12345678 (?)

The ? means the critical section is unnamed. Virtually all Wine internal
sections are named so you can identify them, so ? normally means the
section was created by an application.

thanks -mike




More information about the wine-devel mailing list