Author: jimtabor
Date: Mon Apr 11 03:24:14 2011
New Revision: 51315
URL:
http://svn.reactos.org/svn/reactos?rev=51315&view=rev
Log:
[Win32k]
- PATCH: Arty's fixes based on CMake branch testing. Just the timer code. See bug
6103.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/timer.c
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] Mon Apr 11 03:24:14
2011
@@ -107,10 +107,11 @@
UINT_PTR nID,
UINT flags)
{
- PLIST_ENTRY pLE = TimersListHead.Flink;
+ PLIST_ENTRY pLE;
PTIMER pTmr, RetTmr = NULL;
TimerEnterExclusive();
+ pLE = TimersListHead.Flink;
while (pLE != &TimersListHead)
{
pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList);
@@ -134,10 +135,11 @@
FASTCALL
FindSystemTimer(PMSG pMsg)
{
- PLIST_ENTRY pLE = TimersListHead.Flink;
+ PLIST_ENTRY pLE;
PTIMER pTmr = NULL;
TimerEnterExclusive();
+ pLE = TimersListHead.Flink;
while (pLE != &TimersListHead)
{
pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList);
@@ -158,11 +160,12 @@
ValidateTimerCallback(PTHREADINFO pti,
LPARAM lParam)
{
- PLIST_ENTRY pLE = TimersListHead.Flink;
+ PLIST_ENTRY pLE;
BOOL Ret = FALSE;
PTIMER pTmr;
TimerEnterExclusive();
+ pLE = TimersListHead.Flink;
while (pLE != &TimersListHead)
{
pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList);
@@ -389,7 +392,7 @@
FASTCALL
PostTimerMessages(PWND Window)
{
- PLIST_ENTRY pLE = TimersListHead.Flink;
+ PLIST_ENTRY pLE;
PUSER_MESSAGE_QUEUE ThreadQueue;
MSG Msg;
PTHREADINFO pti;
@@ -400,7 +403,7 @@
ThreadQueue = pti->MessageQueue;
TimerEnterExclusive();
-
+ pLE = TimersListHead.Flink;
while(pLE != &TimersListHead)
{
pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList);
@@ -441,12 +444,12 @@
{
LARGE_INTEGER TickCount, DueTime;
LONG Time;
- PLIST_ENTRY pLE = TimersListHead.Flink;
+ PLIST_ENTRY pLE;
PTIMER pTmr;
LONG TimerCount = 0;
TimerEnterExclusive();
-
+ pLE = TimersListHead.Flink;
KeQueryTickCount(&TickCount);
Time = MsqCalculateMessageTime(&TickCount);
@@ -515,7 +518,7 @@
BOOL FASTCALL
DestroyTimersForWindow(PTHREADINFO pti, PWND Window)
{
- PLIST_ENTRY pLE = TimersListHead.Flink;
+ PLIST_ENTRY pLE;
PTIMER pTmr;
BOOL TimersRemoved = FALSE;
@@ -523,7 +526,7 @@
return FALSE;
TimerEnterExclusive();
-
+ pLE = TimersListHead.Flink;
while(pLE != &TimersListHead)
{
pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList);
@@ -570,14 +573,14 @@
DPRINT("IntKillTimer Window %x id %p systemtimer %s\n",
Window, IDEvent, SystemTimer ? "TRUE" : "FALSE");
+ TimerEnterExclusive();
pTmr = FindTimer(Window, IDEvent, SystemTimer ? TMRF_SYSTEM : 0);
if (pTmr)
{
- TimerEnterExclusive();
RemoveTimer(pTmr);
- TimerLeave();
}
+ TimerLeave();
return pTmr ? TRUE : FALSE;
}