PKTHREAD CurrentThread = KeGetCurrentThread();
NTSTATUS WaitStatus = STATUS_SUCCESS;
BOOLEAN Swappable;
+ PLARGE_INTEGER OriginalDueTime = Interval;
+ LARGE_INTEGER DueTime, NewDueTime;
/* Check if the lock is already held */
if (CurrentThread->WaitNext)
break;
}
+ /* Save due time */
+ DueTime.QuadPart = ThreadTimer->DueTime.QuadPart;
+
/* Handle Kernel Queues */
if (CurrentThread->Queue) KiWakeQueue(CurrentThread->Queue);
return WaitStatus;
}
- /* Check if we had a timeout */
- DPRINT1("If you see this message, contact Alex ASAP\n");
- KEBUGCHECK(0);
+ /* Recalculate due times */
+ Interval = KiRecalculateDueTime(OriginalDueTime,
+ &DueTime,
+ &NewDueTime);
}
/* Acquire again the lock */
PKTHREAD CurrentThread = KeGetCurrentThread();
NTSTATUS WaitStatus = STATUS_SUCCESS;
BOOLEAN Swappable;
+ LARGE_INTEGER DueTime, NewDueTime;
+ PLARGE_INTEGER OriginalDueTime = Timeout;
/* Check if the lock is already held */
if (CurrentThread->WaitNext)
WaitStatus = STATUS_TIMEOUT;
goto DontWait;
}
+
+ /* Set the current due time */
+ DueTime.QuadPart = ThreadTimer->DueTime.QuadPart;
}
else
{
/* Check if we had a timeout */
if (Timeout)
{
- DPRINT1("If you see this message, contact Alex ASAP\n");
- KEBUGCHECK(0);
+ /* Recalculate due times */
+ Timeout = KiRecalculateDueTime(OriginalDueTime,
+ &DueTime,
+ &NewDueTime);
}
}
ULONG WaitIndex;
NTSTATUS WaitStatus = STATUS_SUCCESS;
BOOLEAN Swappable;
+ PLARGE_INTEGER OriginalDueTime = Timeout;
+ LARGE_INTEGER DueTime, NewDueTime;
/* Set the Current Thread */
CurrentThread = KeGetCurrentThread();
WaitStatus = STATUS_TIMEOUT;
goto DontWait;
}
+
+ /* Set the current due time */
+ DueTime.QuadPart = ThreadTimer->DueTime.QuadPart;
}
/* Insert into Object's Wait List*/
/* Check if we had a timeout */
if (Timeout)
{
- DPRINT1("If you see this message, contact Alex ASAP\n");
- KEBUGCHECK(0);
+ /* Recalculate due times */
+ Timeout = KiRecalculateDueTime(OriginalDueTime,
+ &DueTime,
+ &NewDueTime);
}
/* Acquire again the lock */