user32: Avoid race-condition when unloading module while hook is still active.

Sebastian Lackner sebastian at
Sun Jun 15 18:10:48 CDT 2014

Original patch by Sam Revitch

In contrary to the original patch this one avoids loading/unloading the
module on every call. Please note that the performance can still be
worse than before (because of the loader-locks that have to be acquired
while incrementing/decrementing the refcount), but thats something we
cannot really avoid.

 dlls/user32/hook.c         |   16 ++++++++++++----
 dlls/user32/message.c      |    5 ++++-
 dlls/user32/user_private.h |    2 +-
 3 files changed, 17 insertions(+), 6 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-user32-Avoid-race-condition-when-unloading-module-wh.patch
Type: text/x-patch
Size: 6073 bytes
Desc: not available
URL: <>

More information about the wine-patches mailing list