Author: fireball
Date: Tue Apr 13 22:11:19 2010
New Revision: 46861
URL:
http://svn.reactos.org/svn/reactos?rev=46861&view=rev
Log:
- Grab a USER lock when entering timer worker routines, fixes race conditions (were
exhibited by user32_winetest msg).
Modified:
branches/arwinss/reactos/subsystems/win32/win32k/wine/queue.c
Modified: branches/arwinss/reactos/subsystems/win32/win32k/wine/queue.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/wine/queue.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/wine/queue.c [iso-8859-1] Tue Apr 13
22:11:19 2010
@@ -529,6 +529,8 @@
{
struct message_result *result = Context;
+ UserEnterExclusive();
+
assert( !result->replied );
result->timeout = NULL;
@@ -547,11 +549,13 @@
if (!result->sender)
{
free_result( result );
+ UserLeave();
return;
}
}
store_message_result( result, 0, STATUS_TIMEOUT );
+ UserLeave();
}
/* message timed out without getting a reply */
@@ -1060,6 +1064,8 @@
struct msg_queue *queue = Context;
struct list *ptr;
+ UserEnterExclusive();
+
/* Free workitem */
ExFreePool(queue->work_item);
@@ -1069,6 +1075,8 @@
list_remove( ptr );
list_add_tail( &queue->expired_timers, ptr );
set_next_timer( queue );
+
+ UserLeave();
}
static