- Don't use Kf* and Kef* in portable code.
authorStefan Ginsberg <stefanginsberg@gmail.com>
Wed, 15 Jul 2009 10:22:05 +0000 (10:22 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Wed, 15 Jul 2009 10:22:05 +0000 (10:22 +0000)
svn path=/trunk/; revision=41965

reactos/drivers/network/ndis/ndis/control.c
reactos/drivers/video/videoprt/spinlock.c
reactos/drivers/video/videoprt/videoprt.c
reactos/ntoskrnl/ke/dpc.c
reactos/ntoskrnl/ke/spinlock.c

index 572fd89..2a5bbc5 100644 (file)
@@ -83,9 +83,9 @@ NdisAcquireReadWriteLock(
         if (Lock->Context != PsGetCurrentThread()) {
           /* Wait for the exclusive lock to be released. */
           Lock->RefCount[KeGetCurrentProcessorNumber()].RefCount--;
-          KefAcquireSpinLockAtDpcLevel(&Lock->SpinLock);
+          KeAcquireSpinLockAtDpcLevel(&Lock->SpinLock);
           Lock->RefCount[KeGetCurrentProcessorNumber()].RefCount++;
-          KefReleaseSpinLockFromDpcLevel(&Lock->SpinLock);
+          KeReleaseSpinLockFromDpcLevel(&Lock->SpinLock);
         }
       }
     }
@@ -124,7 +124,7 @@ NdisReleaseReadWriteLock(
     case 4: /* Exclusive write lock */
       Lock->Context = NULL;
       LockState->LockState = -1;
-      KfReleaseSpinLock(&Lock->SpinLock, LockState->OldIrql);
+      KeReleaseSpinLock(&Lock->SpinLock, LockState->OldIrql);
       return;
   }
 }
index 342485b..acbcffa 100644 (file)
@@ -77,7 +77,7 @@ VideoPortAcquireSpinLockAtDpcLevel(
    IN PSPIN_LOCK SpinLock)
 {
    TRACE_(VIDEOPRT, "VideoPortAcquireSpinLockAtDpcLevel\n");
-   KefAcquireSpinLockAtDpcLevel((PKSPIN_LOCK)SpinLock);
+   KeAcquireSpinLockAtDpcLevel((PKSPIN_LOCK)SpinLock);
 }
 
 /*
@@ -104,5 +104,5 @@ VideoPortReleaseSpinLockFromDpcLevel(
    IN PSPIN_LOCK SpinLock)
 {
    TRACE_(VIDEOPRT, "VideoPortReleaseSpinLockFromDpcLevel\n");
-   KefReleaseSpinLockFromDpcLevel((PKSPIN_LOCK)SpinLock);
+   KeReleaseSpinLockFromDpcLevel((PKSPIN_LOCK)SpinLock);
 }
index 4eb5822..3d14c85 100644 (file)
@@ -1045,12 +1045,12 @@ VideoPortSynchronizeExecution(
       case VpHighPriority:
          OldIrql = KeGetCurrentIrql();
          if (OldIrql < SYNCH_LEVEL)
-            OldIrql = KfRaiseIrql(SYNCH_LEVEL);
+            KeRaiseIrql(SYNCH_LEVEL, &OldIrql);
 
          Ret = (*SynchronizeRoutine)(Context);
 
          if (OldIrql < SYNCH_LEVEL)
-            KfLowerIrql(OldIrql);
+            KeLowerIrql(OldIrql);
          break;
 
       default:
index f6fe58f..47fb550 100644 (file)
@@ -578,7 +578,7 @@ KiRetireDpcList(IN PKPRCB Prcb)
         while (DpcData->DpcQueueDepth != 0)
         {
             /* Lock the DPC data and get the DPC entry*/
-            KefAcquireSpinLockAtDpcLevel(&DpcData->DpcLock);
+            KeAcquireSpinLockAtDpcLevel(&DpcData->DpcLock);
             DpcEntry = ListHead->Flink;
 
             /* Make sure we have an entry */
@@ -602,7 +602,7 @@ KiRetireDpcList(IN PKPRCB Prcb)
                 Prcb->DebugDpcTime = 0;
 
                 /* Release the lock */
-                KefReleaseSpinLockFromDpcLevel(&DpcData->DpcLock);
+                KeReleaseSpinLockFromDpcLevel(&DpcData->DpcLock);
 
                 /* Re-enable interrupts */
                 _enable();
@@ -623,7 +623,7 @@ KiRetireDpcList(IN PKPRCB Prcb)
                 ASSERT(DpcData->DpcQueueDepth == 0);
 
                 /* Release DPC Lock */
-                KefReleaseSpinLockFromDpcLevel(&DpcData->DpcLock);
+                KeReleaseSpinLockFromDpcLevel(&DpcData->DpcLock);
             }
         }
 
index bd13d50..7e63026 100644 (file)
@@ -86,6 +86,38 @@ KeReleaseQueuedSpinLockFromDpcLevel(IN PKSPIN_LOCK_QUEUE LockHandle)
 
 /* PUBLIC FUNCTIONS **********************************************************/
 
+/*
+ * @implemented
+ */
+KIRQL
+NTAPI
+KeAcquireInterruptSpinLock(IN PKINTERRUPT Interrupt)
+{
+    KIRQL OldIrql;
+
+    /* Raise IRQL */
+    KeRaiseIrql(Interrupt->SynchronizeIrql, &OldIrql);
+
+    /* Acquire spinlock on MP */
+    KeAcquireSpinLockAtDpcLevel(Interrupt->ActualLock);
+    return OldIrql;
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+KeReleaseInterruptSpinLock(IN PKINTERRUPT Interrupt,
+                           IN KIRQL OldIrql)
+{
+    /* Release lock on MP */
+    KeReleaseSpinLockFromDpcLevel(Interrupt->ActualLock);
+
+    /* Lower IRQL */
+    KeLowerIrql(OldIrql);
+}
+
 /*
  * @implemented
  */
@@ -228,38 +260,6 @@ KeReleaseInStackQueuedSpinLockFromDpcLevel(IN PKLOCK_QUEUE_HANDLE LockHandle)
 #endif
 }
 
-/*
- * @implemented
- */
-KIRQL
-NTAPI
-KeAcquireInterruptSpinLock(IN PKINTERRUPT Interrupt)
-{
-    KIRQL OldIrql;
-
-    /* Raise IRQL */
-    KeRaiseIrql(Interrupt->SynchronizeIrql, &OldIrql);
-
-    /* Acquire spinlock on MP */
-    KefAcquireSpinLockAtDpcLevel(Interrupt->ActualLock);
-    return OldIrql;
-}
-
-/*
- * @implemented
- */
-VOID
-NTAPI
-KeReleaseInterruptSpinLock(IN PKINTERRUPT Interrupt,
-                           IN KIRQL OldIrql)
-{
-    /* Release lock on MP */
-    KefReleaseSpinLockFromDpcLevel(Interrupt->ActualLock);
-
-    /* Lower IRQL */
-    KeLowerIrql(OldIrql);
-}
-
 /*
  * @unimplemented
  */