[STORPORT] Fix x64 build
[reactos.git] / ntoskrnl / ke / amd64 / stubs.c
index 34d637d..f63485e 100644 (file)
@@ -115,15 +115,15 @@ KiIdleLoop(VOID)
     PKPRCB Prcb = KeGetCurrentPrcb();
     PKTHREAD OldThread, NewThread;
 
-    /* Initialize the idle loop: disable interrupts */
-    _enable();
-    YieldProcessor();
-    YieldProcessor();
-    _disable();
-
     /* Now loop forever */
     while (TRUE)
     {
+        /* Start of the idle loop: disable interrupts */
+        _enable();
+        YieldProcessor();
+        YieldProcessor();
+        _disable();
+
         /* Check for pending timers, pending DPCs, or pending ready threads */
         if ((Prcb->DpcData[0].DpcQueueDepth) ||
             (Prcb->TimerRequest) ||
@@ -139,7 +139,7 @@ KiIdleLoop(VOID)
         /* Check if a new thread is scheduled for execution */
         if (Prcb->NextThread)
         {
-            /* Enable interupts */
+            /* Enable interrupts */
             _enable();
 
             /* Capture current thread data */
@@ -161,12 +161,6 @@ KiIdleLoop(VOID)
 
             /* Go back to DISPATCH_LEVEL */
             KeLowerIrql(DISPATCH_LEVEL);
-
-            /* We are back in the idle thread -- disable interrupts again */
-            _enable();
-            YieldProcessor();
-            YieldProcessor();
-            _disable();
         }
         else
         {
@@ -453,15 +447,6 @@ KiCallUserMode(
     return STATUS_UNSUCCESSFUL;
 }
 
-#undef ExQueryDepthSList
-NTKERNELAPI
-USHORT
-ExQueryDepthSList(IN PSLIST_HEADER ListHead)
-{
-    return (USHORT)(ListHead->Alignment & 0xffff);
-}
-
-
 ULONG ProcessCount;
 BOOLEAN CcPfEnablePrefetcher;