Author: mjmartin
Date: Thu May 20 23:07:53 2010
New Revision: 47284
URL:
http://svn.reactos.org/svn/reactos?rev=47284&view=rev
Log:
[win32k]
- Set MasterTimer initial value to NULL and Initialize MasterTimer at the beginning of
RawInputThreadMain before doing anything else.
- Add ASSERTs to catch if MasterTimer is NULL.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/input.c
trunk/reactos/subsystems/win32/win32k/ntuser/timer.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/input.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] Thu May 20 23:07:53
2010
@@ -22,7 +22,7 @@
/* GLOBALS *******************************************************************/
PTHREADINFO ptiRawInput;
-PKTIMER MasterTimer;
+PKTIMER MasterTimer = NULL;
PATTACHINFO gpai = NULL;
static HANDLE MouseDeviceHandle;
@@ -868,18 +868,6 @@
NTSTATUS Status;
LARGE_INTEGER DueTime;
- DueTime.QuadPart = (LONGLONG)(-10000000);
-
- do
- {
- KEVENT Event;
- KeInitializeEvent(&Event, NotificationEvent, FALSE);
- Status = KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE,
&DueTime);
- } while (!NT_SUCCESS(Status));
-
-
- Objects[0] = &InputThreadsStart;
-
MasterTimer = ExAllocatePoolWithTag(NonPagedPool, sizeof(KTIMER), TAG_INPUT);
if (!MasterTimer)
{
@@ -887,6 +875,18 @@
return;
}
KeInitializeTimer(MasterTimer);
+
+ DueTime.QuadPart = (LONGLONG)(-10000000);
+
+ do
+ {
+ KEVENT Event;
+ KeInitializeEvent(&Event, NotificationEvent, FALSE);
+ Status = KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE,
&DueTime);
+ } while (!NT_SUCCESS(Status));
+
+
+ Objects[0] = &InputThreadsStart;
Objects[1] = MasterTimer;
// This thread requires win32k!
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/timer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] Thu May 20 23:07:53
2010
@@ -245,6 +245,7 @@
pTmr->flags &= ~TMRF_DELETEPENDING;
}
+ ASSERT(MasterTimer != NULL);
// Start the timer thread!
if (pTmr == FirstpTmr)
KeSetTimer(MasterTimer, DueTime, NULL);
@@ -419,6 +420,7 @@
} while (pTmr != FirstpTmr);
// Restart the timer thread!
+ ASSERT(MasterTimer != NULL);
KeSetTimer(MasterTimer, DueTime, NULL);
TimeLast = Time;