Fix an old typo.

svn path=/trunk/; revision=10144
This commit is contained in:
Eric Kohl 2004-07-16 19:54:05 +00:00
parent fbdcc7cb6f
commit fa2ac0c0ca
2 changed files with 45 additions and 40 deletions

View file

@ -1,4 +1,4 @@
/* $Id: sysinfo.c,v 1.37 2004/06/23 21:01:27 ion Exp $ /* $Id: sysinfo.c,v 1.38 2004/07/16 19:49:15 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -497,7 +497,7 @@ QSI_DEF(SystemPerformanceInformation)
QSI_DEF(SystemTimeOfDayInformation) QSI_DEF(SystemTimeOfDayInformation)
{ {
LARGE_INTEGER CurrentTime; LARGE_INTEGER CurrentTime;
PSYSTEM_TIMEOFDAY_INFORMATION Sti PSYSTEM_TIMEOFDAY_INFORMATION Sti
= (PSYSTEM_TIMEOFDAY_INFORMATION) Buffer; = (PSYSTEM_TIMEOFDAY_INFORMATION) Buffer;
@ -593,24 +593,24 @@ QSI_DEF(SystemProcessInformation)
SpiCur->BasePriority = pr->Pcb.BasePriority; SpiCur->BasePriority = pr->Pcb.BasePriority;
SpiCur->ProcessId = pr->UniqueProcessId; SpiCur->ProcessId = pr->UniqueProcessId;
SpiCur->InheritedFromProcessId = (DWORD)(pr->InheritedFromUniqueProcessId); SpiCur->InheritedFromProcessId = (DWORD)(pr->InheritedFromUniqueProcessId);
SpiCur->HandleCount = ObpGetHandleCountbyHandleTable(&pr->HandleTable); SpiCur->HandleCount = ObpGetHandleCountByHandleTable(&pr->HandleTable);
SpiCur->VmCounters.PeakVirtualSize = pr->PeakVirtualSize; SpiCur->VmCounters.PeakVirtualSize = pr->PeakVirtualSize;
SpiCur->VmCounters.VirtualSize = pr->VirtualSize.QuadPart; SpiCur->VmCounters.VirtualSize = pr->VirtualSize.QuadPart;
SpiCur->VmCounters.PageFaultCount = pr->LastFaultCount; SpiCur->VmCounters.PageFaultCount = pr->LastFaultCount;
SpiCur->VmCounters.PeakWorkingSetSize = pr->Vm.PeakWorkingSetSize; // Is this right using ->Vm. here ? SpiCur->VmCounters.PeakWorkingSetSize = pr->Vm.PeakWorkingSetSize; // Is this right using ->Vm. here ?
SpiCur->VmCounters.WorkingSetSize = pr->Vm.WorkingSetSize; // Is this right using ->Vm. here ? SpiCur->VmCounters.WorkingSetSize = pr->Vm.WorkingSetSize; // Is this right using ->Vm. here ?
SpiCur->VmCounters.QuotaPeakPagedPoolUsage = SpiCur->VmCounters.QuotaPeakPagedPoolUsage =
pr->QuotaPeakPoolUsage[0]; pr->QuotaPeakPoolUsage[0];
SpiCur->VmCounters.QuotaPagedPoolUsage = SpiCur->VmCounters.QuotaPagedPoolUsage =
pr->QuotaPoolUsage[0]; pr->QuotaPoolUsage[0];
SpiCur->VmCounters.QuotaPeakNonPagedPoolUsage = SpiCur->VmCounters.QuotaPeakNonPagedPoolUsage =
pr->QuotaPeakPoolUsage[1]; pr->QuotaPeakPoolUsage[1];
SpiCur->VmCounters.QuotaNonPagedPoolUsage = SpiCur->VmCounters.QuotaNonPagedPoolUsage =
pr->QuotaPoolUsage[1]; pr->QuotaPoolUsage[1];
SpiCur->VmCounters.PagefileUsage = pr->PagefileUsage; // FIXME SpiCur->VmCounters.PagefileUsage = pr->PagefileUsage; // FIXME
SpiCur->VmCounters.PeakPagefileUsage = pr->PeakPagefileUsage; SpiCur->VmCounters.PeakPagefileUsage = pr->PeakPagefileUsage;
// KJK::Hyperion: I don't know what does this mean. VM_COUNTERS // KJK::Hyperion: I don't know what does this mean. VM_COUNTERS
// doesn't seem to contain any equivalent field // doesn't seem to contain any equivalent field
//SpiCur->TotalPrivateBytes = pr->NumberOfPrivatePages; //FIXME: bytes != pages //SpiCur->TotalPrivateBytes = pr->NumberOfPrivatePages; //FIXME: bytes != pages
pr = PsGetNextProcess(pr); pr = PsGetNextProcess(pr);
@ -627,7 +627,7 @@ QSI_DEF(SystemProcessInformation)
*ReqSize = ovlSize; *ReqSize = ovlSize;
if (pr != NULL) if (pr != NULL)
{ {
ObDereferenceObject(pr); ObDereferenceObject(pr);
} }
return (STATUS_SUCCESS); return (STATUS_SUCCESS);
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: handle.c,v 1.56 2004/05/04 20:18:52 jimtabor Exp $ /* $Id: handle.c,v 1.57 2004/07/16 19:54:05 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -950,39 +950,44 @@ ObInsertObject(IN PVOID Object,
} }
ULONG ULONG
ObpGetHandleCountbyHandleTable(PHANDLE_TABLE HandleTable) ObpGetHandleCountByHandleTable(PHANDLE_TABLE HandleTable)
{ {
unsigned int i, Count=0; PHANDLE_BLOCK blk;
PHANDLE_BLOCK blk; POBJECT_HEADER Header;
POBJECT_HEADER Header; PVOID ObjectBody;
PVOID ObjectBody; KIRQL OldIrql;
KIRQL oldIrql; PLIST_ENTRY current;
ULONG i;
ULONG Count=0;
PLIST_ENTRY current = HandleTable->ListHead.Flink; KeAcquireSpinLock(&HandleTable->ListLock, &OldIrql);
KeAcquireSpinLock(&HandleTable->ListLock, &oldIrql);
current = HandleTable->ListHead.Flink;
while (current != &HandleTable->ListHead) while (current != &HandleTable->ListHead)
{ {
blk = CONTAINING_RECORD(current, HANDLE_BLOCK, entry); blk = CONTAINING_RECORD(current, HANDLE_BLOCK, entry);
for ( i=0; i<HANDLE_BLOCK_ENTRIES; i++) for (i = 0; i < HANDLE_BLOCK_ENTRIES; i++)
{ {
ObjectBody = OB_ENTRY_TO_POINTER(blk->handles[i].ObjectBody); ObjectBody = OB_ENTRY_TO_POINTER(blk->handles[i].ObjectBody);
if (ObjectBody != NULL)
if (ObjectBody != NULL) {
{ Header = BODY_TO_HEADER(ObjectBody);
Header = BODY_TO_HEADER(ObjectBody);
/* Make sure this is real. */ /* Make sure this is real. */
if (Header->ObjectType != NULL) if (Header->ObjectType != NULL)
Count++; Count++;
} }
} }
current = current->Flink;
} current = current->Flink;
KeReleaseSpinLock(&HandleTable->ListLock, oldIrql); }
return (Count);
KeReleaseSpinLock(&HandleTable->ListLock,
OldIrql);
return Count;
} }
/* EOF */ /* EOF */