mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 00:45:43 +00:00
- Removed the timer value lock, because this lock isn't necessary.
- Update the kernel and user time from the kpcr. svn path=/trunk/; revision=11841
This commit is contained in:
parent
e64b5d5945
commit
e0b921f698
1 changed files with 3 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: timer.c,v 1.90 2004/11/21 18:33:54 gdalsnes Exp $
|
/* $Id: timer.c,v 1.91 2004/11/27 16:57:03 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -68,7 +68,6 @@ EXPORTED ULONG KeMinimumIncrement = 100000;
|
||||||
static LIST_ENTRY AbsoluteTimerListHead;
|
static LIST_ENTRY AbsoluteTimerListHead;
|
||||||
static LIST_ENTRY RelativeTimerListHead;
|
static LIST_ENTRY RelativeTimerListHead;
|
||||||
static KSPIN_LOCK TimerListLock;
|
static KSPIN_LOCK TimerListLock;
|
||||||
static KSPIN_LOCK TimerValueLock;
|
|
||||||
static KDPC ExpireTimerDpc;
|
static KDPC ExpireTimerDpc;
|
||||||
|
|
||||||
/* must raise IRQL to PROFILE_LEVEL and grab spin lock there, to sync with ISR */
|
/* must raise IRQL to PROFILE_LEVEL and grab spin lock there, to sync with ISR */
|
||||||
|
@ -641,7 +640,6 @@ KeInitializeTimerImpl(VOID)
|
||||||
InitializeListHead(&AbsoluteTimerListHead);
|
InitializeListHead(&AbsoluteTimerListHead);
|
||||||
InitializeListHead(&RelativeTimerListHead);
|
InitializeListHead(&RelativeTimerListHead);
|
||||||
KeInitializeSpinLock(&TimerListLock);
|
KeInitializeSpinLock(&TimerListLock);
|
||||||
KeInitializeSpinLock(&TimerValueLock);
|
|
||||||
KeInitializeDpc(&ExpireTimerDpc, KeExpireTimers, 0);
|
KeInitializeDpc(&ExpireTimerDpc, KeExpireTimers, 0);
|
||||||
/*
|
/*
|
||||||
* Calculate the starting time for the system clock
|
* Calculate the starting time for the system clock
|
||||||
|
@ -716,7 +714,7 @@ KeUpdateRunTime(
|
||||||
{
|
{
|
||||||
InterlockedIncrement((PLONG)&CurrentThread->UserTime);
|
InterlockedIncrement((PLONG)&CurrentThread->UserTime);
|
||||||
InterlockedIncrement((PLONG)&CurrentProcess->UserTime);
|
InterlockedIncrement((PLONG)&CurrentProcess->UserTime);
|
||||||
InterlockedIncrement((PLONG)&Pcr->PrcbData.UserTime);
|
Pcr->PrcbData.UserTime++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -732,6 +730,7 @@ KeUpdateRunTime(
|
||||||
{
|
{
|
||||||
InterlockedIncrement((PLONG)&CurrentThread->KernelTime);
|
InterlockedIncrement((PLONG)&CurrentThread->KernelTime);
|
||||||
InterlockedIncrement((PLONG)&CurrentProcess->KernelTime);
|
InterlockedIncrement((PLONG)&CurrentProcess->KernelTime);
|
||||||
|
Pcr->PrcbData.KernelTime++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -796,7 +795,6 @@ KeUpdateSystemTime(
|
||||||
*/
|
*/
|
||||||
KeTickCount++;
|
KeTickCount++;
|
||||||
SharedUserData->TickCountLowDeprecated++;
|
SharedUserData->TickCountLowDeprecated++;
|
||||||
KiAcquireSpinLock(&TimerValueLock);
|
|
||||||
|
|
||||||
Time.u.LowPart = SharedUserData->InterruptTime.LowPart;
|
Time.u.LowPart = SharedUserData->InterruptTime.LowPart;
|
||||||
Time.u.HighPart = SharedUserData->InterruptTime.High1Time;
|
Time.u.HighPart = SharedUserData->InterruptTime.High1Time;
|
||||||
|
@ -814,8 +812,6 @@ KeUpdateSystemTime(
|
||||||
|
|
||||||
/* FIXME: Here we should check for remote debugger break-ins */
|
/* FIXME: Here we should check for remote debugger break-ins */
|
||||||
|
|
||||||
KiReleaseSpinLock(&TimerValueLock);
|
|
||||||
|
|
||||||
/* Update process and thread times */
|
/* Update process and thread times */
|
||||||
KeUpdateRunTime(TrapFrame, Irql);
|
KeUpdateRunTime(TrapFrame, Irql);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue