KD System Rewrite:
[reactos.git] / reactos / ntoskrnl / ke / device.c
index b398517..31c9555 100644 (file)
@@ -1,10 +1,11 @@
-/* $Id: device.c,v 1.4 2004/10/13 22:27:03 ion Exp $
+/* $Id$
  *
- * FILE:            ntoskrnl/ke/profile.c
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS kernel
+ * FILE:            ntoskrnl/ke/device.c
  * PURPOSE:         Kernel Device/Settings Functions
- * PROGRAMMER:      Alex Ionescu (alex@relsoft.net)
- * UPDATE HISTORY:
- *                  Created 23/06/04
+ * 
+ * PROGRAMMERS:     Alex Ionescu (alex@relsoft.net)
  */
 
 #include <ntoskrnl.h>
@@ -55,18 +56,18 @@ KeFlushEntireTb(
 )
 {
        KIRQL OldIrql;
-       PKPROCESS Process;
-       PKPCR Pcr;
+       PKPROCESS Process = NULL;
+       PKPRCB Prcb = NULL;
        
        /* Raise the IRQL for the TB Flush */
        OldIrql = KeRaiseIrqlToSynchLevel();
        
        /* All CPUs need to have the TB flushed. */
        if (CurrentCpuOnly == FALSE) {
-               Pcr = KeGetCurrentKPCR();
+               Prcb = KeGetCurrentPrcb();
                
                /* How many CPUs is our caller using? */
-               Process = Pcr->PrcbData.CurrentThread->ApcState.Process;
+               Process = Prcb->CurrentThread->ApcState.Process;
                
                /* More then one, so send an IPI */
                if (Process->ActiveProcessors > 1) {
@@ -82,7 +83,7 @@ KeFlushEntireTb(
                /* Did we send an IPI? If so, wait for completion */
                if (Process->ActiveProcessors > 1) {
                        do {
-                       } while (Pcr->PrcbData.TargetSet != 0);
+                       } while (Prcb->TargetSet != 0);
                } 
        }