mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 04:37:15 +00:00
[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. svn path=/trunk/; revision=47284
This commit is contained in:
parent
8576b9c8e0
commit
c88634cff4
2 changed files with 11 additions and 9 deletions
|
@ -22,7 +22,7 @@ extern NTSTATUS Win32kInitWin32Thread(PETHREAD Thread);
|
||||||
/* GLOBALS *******************************************************************/
|
/* GLOBALS *******************************************************************/
|
||||||
|
|
||||||
PTHREADINFO ptiRawInput;
|
PTHREADINFO ptiRawInput;
|
||||||
PKTIMER MasterTimer;
|
PKTIMER MasterTimer = NULL;
|
||||||
PATTACHINFO gpai = NULL;
|
PATTACHINFO gpai = NULL;
|
||||||
|
|
||||||
static HANDLE MouseDeviceHandle;
|
static HANDLE MouseDeviceHandle;
|
||||||
|
@ -868,6 +868,14 @@ RawInputThreadMain(PVOID StartContext)
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
LARGE_INTEGER DueTime;
|
LARGE_INTEGER DueTime;
|
||||||
|
|
||||||
|
MasterTimer = ExAllocatePoolWithTag(NonPagedPool, sizeof(KTIMER), TAG_INPUT);
|
||||||
|
if (!MasterTimer)
|
||||||
|
{
|
||||||
|
DPRINT1("Win32K: Failed making Raw Input thread a win32 thread.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
KeInitializeTimer(MasterTimer);
|
||||||
|
|
||||||
DueTime.QuadPart = (LONGLONG)(-10000000);
|
DueTime.QuadPart = (LONGLONG)(-10000000);
|
||||||
|
|
||||||
do
|
do
|
||||||
|
@ -879,14 +887,6 @@ RawInputThreadMain(PVOID StartContext)
|
||||||
|
|
||||||
|
|
||||||
Objects[0] = &InputThreadsStart;
|
Objects[0] = &InputThreadsStart;
|
||||||
|
|
||||||
MasterTimer = ExAllocatePoolWithTag(NonPagedPool, sizeof(KTIMER), TAG_INPUT);
|
|
||||||
if (!MasterTimer)
|
|
||||||
{
|
|
||||||
DPRINT1("Win32K: Failed making Raw Input thread a win32 thread.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
KeInitializeTimer(MasterTimer);
|
|
||||||
Objects[1] = MasterTimer;
|
Objects[1] = MasterTimer;
|
||||||
|
|
||||||
// This thread requires win32k!
|
// This thread requires win32k!
|
||||||
|
|
|
@ -245,6 +245,7 @@ IntSetTimer( PWINDOW_OBJECT Window,
|
||||||
pTmr->flags &= ~TMRF_DELETEPENDING;
|
pTmr->flags &= ~TMRF_DELETEPENDING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ASSERT(MasterTimer != NULL);
|
||||||
// Start the timer thread!
|
// Start the timer thread!
|
||||||
if (pTmr == FirstpTmr)
|
if (pTmr == FirstpTmr)
|
||||||
KeSetTimer(MasterTimer, DueTime, NULL);
|
KeSetTimer(MasterTimer, DueTime, NULL);
|
||||||
|
@ -419,6 +420,7 @@ ProcessTimers(VOID)
|
||||||
} while (pTmr != FirstpTmr);
|
} while (pTmr != FirstpTmr);
|
||||||
|
|
||||||
// Restart the timer thread!
|
// Restart the timer thread!
|
||||||
|
ASSERT(MasterTimer != NULL);
|
||||||
KeSetTimer(MasterTimer, DueTime, NULL);
|
KeSetTimer(MasterTimer, DueTime, NULL);
|
||||||
|
|
||||||
TimeLast = Time;
|
TimeLast = Time;
|
||||||
|
|
Loading…
Reference in a new issue