wined3d: Use a separate mutex for wndproc_table access.

Stefan Dösinger stefandoesinger at
Sat Jun 18 05:51:17 CDT 2011

I can't speak about the conceptual correctness of this patch, although my gut 
feeling says that you're right.

You don't need wined3d_wndproc_mutex_(un)lock. Just use EnterCriticalSection / 
LeaveCriticalSection directly. wined3d_mutex_lock exists because it is 
exported from wined3d.

On Friday 17 June 2011 21:49:38 Piotr Pawlow wrote:
> If CreateDevice is called with hFocusWindow belonging to another thread,
> then any code that does SendMessage (or equivalent) to the window while
> holding the main wined3d mutex causes a deadlock, because wined3d_wndproc
> tries to acquire the same mutex for wndproc_table access. Using a different
> mutex for this purpose solves the problem.
> ---
>   dlls/wined3d/wined3d_main.c |   44
> +++++++++++++++++++++++++++++++-----------
>   1 files changed, 32 insertions(+), 12 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the wine-devel mailing list