mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
- Fix totally broken KeUpdateSystemRuntime code... please at least read your code once before committing.
svn path=/trunk/; revision=34087
This commit is contained in:
parent
eed84f7eae
commit
227dc95404
1 changed files with 11 additions and 10 deletions
|
@ -37,8 +37,12 @@ KeUpdateSystemTime(IN PKTRAP_FRAME TrapFrame,
|
||||||
IN ULONG Increment)
|
IN ULONG Increment)
|
||||||
{
|
{
|
||||||
PKPRCB Prcb = KeGetPcr()->Prcb;
|
PKPRCB Prcb = KeGetPcr()->Prcb;
|
||||||
LARGE_INTEGER SystemTime, InterruptTime;
|
ULARGE_INTEGER SystemTime, InterruptTime;
|
||||||
ULONG Hand;
|
ULONG Hand;
|
||||||
|
DPRINT1("TIMEBASE: %I64d %I64d %I64d\n",
|
||||||
|
*(PLARGE_INTEGER)&SharedUserData->InterruptTime,
|
||||||
|
*(PLARGE_INTEGER)&SharedUserData->SystemTime,
|
||||||
|
*(PLARGE_INTEGER)&SharedUserData->TickCount);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Do nothing if this tick is being skipped
|
// Do nothing if this tick is being skipped
|
||||||
|
@ -70,11 +74,7 @@ KeUpdateSystemTime(IN PKTRAP_FRAME TrapFrame,
|
||||||
//
|
//
|
||||||
// Check for incomplete tick
|
// Check for incomplete tick
|
||||||
//
|
//
|
||||||
if (KiTickOffset > 0)
|
if (KiTickOffset <= 0)
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Update the system time
|
// Update the system time
|
||||||
|
@ -107,14 +107,15 @@ KeUpdateSystemTime(IN PKTRAP_FRAME TrapFrame,
|
||||||
//
|
//
|
||||||
// Check for timer expiration
|
// Check for timer expiration
|
||||||
//
|
//
|
||||||
Hand = KeTickCount.LowPart & (TIMER_TABLE_SIZE - 1);
|
Hand = KeTickCount.LowPart % TIMER_TABLE_SIZE;
|
||||||
Hand <<= 4;
|
if (KiTimerTableListHead[Hand].Time.QuadPart <= InterruptTime.QuadPart)
|
||||||
if (KiTimerTableListHead[Hand].Time.QuadPart > InterruptTime.QuadPart)
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Timer has expired!
|
// Timer has expired!
|
||||||
//
|
//
|
||||||
DPRINT1("TIMER EXPIRATION!!!\n");
|
DPRINT1("hand: %d\n", Hand);
|
||||||
|
DPRINT1("Interrupt time: %I64x\n", InterruptTime.QuadPart);
|
||||||
|
DPRINT1("TIMER EXPIRATION: %I64x!!!\n", KiTimerTableListHead[Hand].Time.QuadPart);
|
||||||
while (TRUE);
|
while (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue