[ros-diffs] [tkreuzer] 46797: [NTOSKRNL] Fix msvc versions of Ke386GetGlobalDescriptorTable and Ke386SetGlobalDescriptorTable. Patch by Jose Catena. See issue #5071 for more details.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Fri Apr 9 23:10:14 CEST 2010


Author: tkreuzer
Date: Fri Apr  9 23:10:13 2010
New Revision: 46797

URL: http://svn.reactos.org/svn/reactos?rev=46797&view=rev
Log:
[NTOSKRNL]
Fix msvc versions of Ke386GetGlobalDescriptorTable and Ke386SetGlobalDescriptorTable. Patch by Jose Catena.

See issue #5071 for more details.

Modified:
    trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h

Modified: trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h?rev=46797&r1=46796&r2=46797&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h [iso-8859-1] Fri Apr  9 23:10:13 2010
@@ -136,17 +136,27 @@
 
 FORCEINLINE
 VOID
-Ke386GetGlobalDescriptorTable(OUT PVOID Descriptor)
-{
-    __asm sgdt [Descriptor];
-}
-
-FORCEINLINE
-VOID
-Ke386SetGlobalDescriptorTable(IN PVOID Descriptor)
-{
-    __asm lgdt [Descriptor];
-}
+__sgdt(OUT PVOID Descriptor)
+{
+    __asm
+    {
+        mov eax, Descriptor
+        sgdt [eax]
+    }
+}
+#define Ke386GetGlobalDescriptorTable __sgdt
+
+FORCEINLINE
+VOID
+__lgdt(IN PVOID Descriptor)
+{
+    __asm
+    {
+        mov eax, Descriptor
+        lgdt [eax]
+    }
+}
+#define Ke386SetGlobalDescriptorTable __lgdt
 
 FORCEINLINE
 USHORT




More information about the Ros-diffs mailing list