Sync to trunk head(r38096)
[reactos.git] / reactos / ntoskrnl / ex / sysinfo.c
index e229008..748d303 100644 (file)
@@ -1063,7 +1063,7 @@ QSI_DEF(SystemHandleInformation)
 
             for (Count = 0; HandleCount > 0 ; HandleCount--)
                {
-                 Shi->Handles[i].UniqueProcessId = (USHORT)(ULONG)pr->UniqueProcessId;
+                 Shi->Handles[i].UniqueProcessId = (USHORT)(ULONG_PTR)pr->UniqueProcessId;
                  Count++;
                  i++;
                }
@@ -1203,7 +1203,11 @@ QSI_DEF(SystemInterruptInformation)
   for (i = 0; i < KeNumberProcessors; i++)
   {
     Prcb = KiProcessorBlock[i];
+#ifdef _M_AMD64
+    Pcr = CONTAINING_RECORD(Prcb, KPCR, CurrentPrcb);
+#else
     Pcr = CONTAINING_RECORD(Prcb, KPCR, Prcb);
+#endif
 #ifdef _M_ARM // This code should probably be done differently
     sii->ContextSwitches = Pcr->ContextSwitches;
 #else
@@ -1941,6 +1945,9 @@ NtFlushInstructionCache (
     for (;;);
 #elif defined(_M_ARM)
     __asm__ __volatile__("mov r1, #0; mcr p15, 0, r1, c7, c5, 0");
+#elif defined(_M_AMD64)
+    DPRINT1("NtFlushInstructionCache() is not implemented\n");
+    for (;;);
 #else
 #error Unknown architecture
 #endif
@@ -1955,4 +1962,4 @@ NtGetCurrentProcessorNumber(VOID)
     return KeGetCurrentProcessorNumber();
 }
 
-/* EOF */
+/* EOF */
\ No newline at end of file