Fix an old typo.
authorEric Kohl <eric.kohl@reactos.org>
Fri, 16 Jul 2004 19:54:05 +0000 (19:54 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Fri, 16 Jul 2004 19:54:05 +0000 (19:54 +0000)
svn path=/trunk/; revision=10144

reactos/ntoskrnl/ex/sysinfo.c
reactos/ntoskrnl/ob/handle.c

index 9c238b8..bb04e18 100644 (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
  * PROJECT:         ReactOS kernel
@@ -497,7 +497,7 @@ QSI_DEF(SystemPerformanceInformation)
 QSI_DEF(SystemTimeOfDayInformation)
 {
        LARGE_INTEGER CurrentTime;
+
        PSYSTEM_TIMEOFDAY_INFORMATION Sti
                = (PSYSTEM_TIMEOFDAY_INFORMATION) Buffer;
 
@@ -593,24 +593,24 @@ 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;
                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.QuotaPeakPagedPoolUsage =
-                                       pr->QuotaPeakPoolUsage[0];
+                                       pr->QuotaPeakPoolUsage[0];
                SpiCur->VmCounters.QuotaPagedPoolUsage =
-                                       pr->QuotaPoolUsage[0]; 
+                                       pr->QuotaPoolUsage[0];
                SpiCur->VmCounters.QuotaPeakNonPagedPoolUsage =
-                                       pr->QuotaPeakPoolUsage[1]; 
-               SpiCur->VmCounters.QuotaNonPagedPoolUsage = 
-                                       pr->QuotaPoolUsage[1]; 
+                                       pr->QuotaPeakPoolUsage[1];
+               SpiCur->VmCounters.QuotaNonPagedPoolUsage =
+                                       pr->QuotaPoolUsage[1];
                SpiCur->VmCounters.PagefileUsage = pr->PagefileUsage; // FIXME
                SpiCur->VmCounters.PeakPagefileUsage = pr->PeakPagefileUsage;
-                // KJK::Hyperion: I don't know what does this mean. VM_COUNTERS
-                // doesn't seem to contain any equivalent field
+               // KJK::Hyperion: I don't know what does this mean. VM_COUNTERS
+               // doesn't seem to contain any equivalent field
                //SpiCur->TotalPrivateBytes = pr->NumberOfPrivatePages; //FIXME: bytes != pages
 
                pr = PsGetNextProcess(pr);
@@ -627,7 +627,7 @@ QSI_DEF(SystemProcessInformation)
        *ReqSize = ovlSize;
        if (pr != NULL)
          {
-            ObDereferenceObject(pr);
+           ObDereferenceObject(pr);
          }
        return (STATUS_SUCCESS);
 }
index edd5a8a..3bc6c84 100644 (file)
@@ -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
@@ -950,39 +950,44 @@ ObInsertObject(IN PVOID Object,
 }
 
 
-ULONG 
-ObpGetHandleCountbyHandleTable(PHANDLE_TABLE HandleTable)
+ULONG
+ObpGetHandleCountByHandleTable(PHANDLE_TABLE HandleTable)
 {
-unsigned int i, Count=0;
-PHANDLE_BLOCK blk;
-POBJECT_HEADER Header;
-PVOID ObjectBody;
-KIRQL oldIrql;
-
-PLIST_ENTRY current = HandleTable->ListHead.Flink;
+  PHANDLE_BLOCK blk;
+  POBJECT_HEADER Header;
+  PVOID ObjectBody;
+  KIRQL OldIrql;
+  PLIST_ENTRY current;
+  ULONG i;
+  ULONG Count=0;
 
-  KeAcquireSpinLock(&HandleTable->ListLock, &oldIrql);
+  KeAcquireSpinLock(&HandleTable->ListLock, &OldIrql);
 
+  current = HandleTable->ListHead.Flink;
   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++)
+       {
+         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;
+    }
 
-         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 */