mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 04:14:53 +00:00
Fix an old typo.
svn path=/trunk/; revision=10144
This commit is contained in:
parent
fbdcc7cb6f
commit
fa2ac0c0ca
2 changed files with 45 additions and 40 deletions
|
@ -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
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -593,7 +593,7 @@ QSI_DEF(SystemProcessInformation)
|
|||
SpiCur->BasePriority = pr->Pcb.BasePriority;
|
||||
SpiCur->ProcessId = pr->UniqueProcessId;
|
||||
SpiCur->InheritedFromProcessId = (DWORD)(pr->InheritedFromUniqueProcessId);
|
||||
SpiCur->HandleCount = ObpGetHandleCountbyHandleTable(&pr->HandleTable);
|
||||
SpiCur->HandleCount = ObpGetHandleCountByHandleTable(&pr->HandleTable);
|
||||
SpiCur->VmCounters.PeakVirtualSize = pr->PeakVirtualSize;
|
||||
SpiCur->VmCounters.VirtualSize = pr->VirtualSize.QuadPart;
|
||||
SpiCur->VmCounters.PageFaultCount = pr->LastFaultCount;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* 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
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -951,18 +951,19 @@ ObInsertObject(IN PVOID Object,
|
|||
|
||||
|
||||
ULONG
|
||||
ObpGetHandleCountbyHandleTable(PHANDLE_TABLE HandleTable)
|
||||
ObpGetHandleCountByHandleTable(PHANDLE_TABLE HandleTable)
|
||||
{
|
||||
unsigned int i, Count=0;
|
||||
PHANDLE_BLOCK blk;
|
||||
POBJECT_HEADER Header;
|
||||
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)
|
||||
{
|
||||
blk = CONTAINING_RECORD(current, HANDLE_BLOCK, entry);
|
||||
|
@ -970,19 +971,23 @@ PLIST_ENTRY current = HandleTable->ListHead.Flink;
|
|||
for (i = 0; i < HANDLE_BLOCK_ENTRIES; i++)
|
||||
{
|
||||
ObjectBody = OB_ENTRY_TO_POINTER(blk->handles[i].ObjectBody);
|
||||
|
||||
if (ObjectBody != NULL)
|
||||
{
|
||||
Header = BODY_TO_HEADER(ObjectBody);
|
||||
|
||||
/* Make sure this is real. */
|
||||
if (Header->ObjectType != NULL)
|
||||
Count++;
|
||||
}
|
||||
}
|
||||
|
||||
current = current->Flink;
|
||||
}
|
||||
KeReleaseSpinLock(&HandleTable->ListLock, oldIrql);
|
||||
return (Count);
|
||||
|
||||
KeReleaseSpinLock(&HandleTable->ListLock,
|
||||
OldIrql);
|
||||
|
||||
return Count;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue